[jQuery] A better way to animate this list..?
I'm new to jQuery so be gentle!!
I have a menu list, and I want each li to fade in one at a time, I can
do this with the following code:
$("ul.menu li:first-child").fadeIn(1000, function () {
$(this).next().fadeIn(1000, function () {
$(this).next().fadeIn(1000, function () {
$(this).next().fadeIn(1000, function () {
$(this).next().fadeIn(1000, function () {
$(this).next().fadeIn(1000, function (){
$(this).next().fadeIn(1000, function (){
$(this).next().fadeIn(1000);
})
});
});
});
});
});
});
As you can see its not nice! I'm sure there is a better way,
especially as the menu is dynamic so I'd never know how many items
there are.
Any help or advice is appreciated.