html - Jquery loop through li one by one -


i have following code displays li item 1 one.

var show = 1; var current = show - 1; var length = 9;  var gallery = $('.quotescroll');    var galleryitems = gallery.children('li'); length = galleryitems.length;   setinterval(function(){     current = (current+1)%60;      galleryitems.eq(current).slidedown();     galleryitems.eq(current - show).slideup(); }, 10000); 

the trouble have need loop throught unordered list continuously. how acheive this?

edit

i found code need, doesn't have nice slide animation.

 setinterval(function() {      var firstli = $('.quotescroll li').first().detach();     $('.quotescroll').append($(firstli));  }, 5000); 

assuming quotescroll list class:

$('.quotescroll li').each(function() {     //this refers each li     //do stuff each }); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -