Queue on a list with jquery
I have a list that is displaying elements one by one, but when one fades
out, the others fades in in the same time. I want to know how would i make
the items to appear right after the previous one is totaly gone.
Code by now:
var current = $(".side_li li:first-child");
setInterval(function() {
$(".side_li li").fadeOut("slow");
current.fadeIn("slow");
current = current.next(".side_li li").length ? current.next(".side_li
li") : $(".side_li li:first-child");
}, 5000);
});
No comments:
Post a Comment