/ Published in: JavaScript

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.
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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(); }
Comments
