Revision: 5468
Updated Code
at March 10, 2008 16:57 by 1man
Updated Code
if($j('body').is('#mtvGuy')){ //Hide before the fade $j('div#sideNav li').hide(); /** * Side Navigation fade in loop */ function outer(){ var a = 0; function inner(){ if(a===$j('div#sideNav li').length){return;} a++; $j('div#sideNav ul li').eq(a).fadeIn(210,function(){fader();}); } return inner; } var fader = outer(); fader(); }
Revision: 5467
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 10, 2008 16:57 by 1man
Initial Code
if($j('body').is('#mtvGuy')){ //Hide before the fade $j('div#sideNav li').hide(); /** * Side Navigation fade in loop */ function outer(){ var a = 0; function inner(){ if(a===$j('div#sideNav li').length){return;} a++; $j('div#sideNav ul li').eq(a).fadeIn(210,function(){fader();}); } return inner; } var fader = outer(); fader();
Initial URL
Initial Description
I'm sure i can clean this up quite a bit, but it works for the moment. This function looks to see if you are on a selected page. If you are it hides the navigation, then loops through and shows each li one after the other. So they don't all fade in together. Needs a tidy i think.
Initial Title
jQuery Fade In Sequence
Initial Tags
navigation, jquery, animation
Initial Language
JavaScript