Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-19-2008, 01:07 AM   PM User | #1
dPoriginals
New to the CF scene

 
Join Date: Dec 2008
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
dPoriginals is an unknown quantity at this point
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
dPoriginals is offline   Reply With Quote
Old 12-19-2008, 03:20 AM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Users who have thanked rangana for this post:
dPoriginals (12-19-2008)
Old 12-19-2008, 07:47 AM   PM User | #3
dPoriginals
New to the CF scene

 
Join Date: Dec 2008
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
dPoriginals is an unknown quantity at this point
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
dPoriginals is offline   Reply With Quote
Old 12-19-2008, 08:06 AM   PM User | #4
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Users who have thanked rangana for this post:
dPoriginals (12-19-2008)
Old 12-19-2008, 08:58 AM   PM User | #5
dPoriginals
New to the CF scene

 
Join Date: Dec 2008
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
dPoriginals is an unknown quantity at this point
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.
dPoriginals is offline   Reply With Quote
Old 12-19-2008, 09:00 AM   PM User | #6
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Users who have thanked rangana for this post:
dPoriginals (12-19-2008)
Old 12-19-2008, 09:04 AM   PM User | #7
dPoriginals
New to the CF scene

 
Join Date: Dec 2008
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
dPoriginals is an unknown quantity at this point
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>
dPoriginals is offline   Reply With Quote
Old 12-19-2008, 09:07 AM   PM User | #8
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Users who have thanked rangana for this post:
dPoriginals (12-19-2008)
Old 12-19-2008, 09:10 AM   PM User | #9
dPoriginals
New to the CF scene

 
Join Date: Dec 2008
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
dPoriginals is an unknown quantity at this point
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.
dPoriginals is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:15 PM.


Advertisement
Log in to turn off these ads.