Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Help changing effect on Jquery bassed ui tabs

    Hey,
    I would like help modding this Toturial so that the animated div slides horizontally and not vertically. i would ask the original author of that tutorial but he hasn't replied to any of the comments in his post to date.

    The scripts is based on Jquery and i have no problems implementing it, the only thing i need is to make it horizontally cuz my design would benefit greatly from this.

    Thanks,
    dP

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Go to sprinkle.js and change highlighted to width:
    Code:
    $('#tabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
    That might met your desire.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    dPoriginals (12-19-2008)

  • #3
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thanks man that worked. didnt think it would be so easy.

    do you know how i could add the same effect to this code.

    it currently doesnt hav any slide effect so im not sure how i modify it.

    the fadeIn effect can be removed if necessary.

    Code:
    <script type="text/javascript"> 
      $("#adv2").idTabs(function(id,list,set){ 
        $("a",set).removeClass("selected") 
        .filter("[@href='"+id+"']",set).addClass("selected"); 
        for(i in list) 
          $(list[i]).hide(); 
        $(id).fadeIn(); 
        return false; 
      }); 
    </script>
    Thanks,
    dP

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    The fadeIn() method fades the background.

    You might need to change the hide() method to fadeOut('slow').

    I hope you're aware about the possible parameter: normal, fast, and a custom number to denote a timeout.

    Hope that helps.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    dPoriginals (12-19-2008)

  • #5
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    4
    Thanked 0 Times in 0 Posts
    hmm i did change the hide() to fadeout, but the efffect i require is slide and not fade.

    i know the that normal fast ect.. are speed controls but im not sure how i change it to show a slide instead of fade.

  • #6
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Try to replace this:
    Code:
    $(list[i]).hide();
    ...with:
    Code:
    $(list[i]).animate({width:'0px'});
    - This will slide horizontally, if you want it to slide vertically, change width to height
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    dPoriginals (12-19-2008)

  • #7
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    4
    Thanked 0 Times in 0 Posts
    no the whole script doesnt work once i do that.

    this is wht i get after replacing:
    Code:
    <script type="text/javascript"> 
      $("#adv2").idTabs(function(id,list,set){ 
        $("a",set).removeClass("selected") 
        .filter("[@href='"+id+"']",set).addClass("selected"); 
        for(i in list) 
          $(list[i]).animate({width:'0px'});
        $(id).fadeIn(); 
        return false; 
      }); 
    </script>

  • #8
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    How about:
    Code:
    $(list[i]).slideDown('slow');
    If you're wanting for some basis on the effects, you might find this link useful:
    http://docs.jquery.com/Effects
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    dPoriginals (12-19-2008)

  • #9
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    4
    Thanked 0 Times in 0 Posts
    no its still the same.

    Its allrite i mailed the author of the script so i guess ill wait for his reply, and in the mean time ill go through the jquery docs and see if can come up with a solution.

    Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •