Enjoy an ad free experience by logging in. Not a member yet?
Register .
12-19-2008, 01:07 AM
PM User |
#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
12-19-2008, 03:20 AM
PM User |
#2
Senior Coder
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.
Users who have thanked rangana for this post:
12-19-2008, 07:47 AM
PM User |
#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
12-19-2008, 08:06 AM
PM User |
#4
Senior Coder
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.
Users who have thanked rangana for this post:
12-19-2008, 08:58 AM
PM User |
#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.
12-19-2008, 09:00 AM
PM User |
#6
Senior Coder
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
Try to replace this:
...with:
Code:
$(list[i]).animate({width:'0px'});
- This will slide horizontally, if you want it to slide vertically, change
width to
height
Users who have thanked rangana for this post:
12-19-2008, 09:04 AM
PM User |
#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>
12-19-2008, 09:07 AM
PM User |
#8
Senior Coder
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
Users who have thanked rangana for this post:
12-19-2008, 09:10 AM
PM User |
#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.
Jump To Top of Thread
Thread Tools
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
HTML code is Off
All times are GMT +1. The time now is 01:15 PM .
Advertisement
Log in to turn off these ads.