js:
$(function(){
var QuesListLi = $(".a").find("span");
var iNow = 0;
h();
function h(){
var time;
clearInterval(time);
time = setInterval(function() {
if(iNow >= QuesListLi.length-1) {
iNow = 0
}
else {
iNow++;
}
QuesListLi.removeClass('b').eq(iNow).addClass('b')
},300)
}
});
html:
<div class="a">
<span class="icon-arrow-right b"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
</div>
$(function(){
var QuesListLi = $(".a").find("span");
var iNow = 0;
h();
function h(){
var time;
clearInterval(time);
time = setInterval(function() {
if(iNow >= QuesListLi.length-1) {
iNow = 0
}
else {
iNow++;
}
QuesListLi.removeClass('b').eq(iNow).addClass('b')
},300)
}
});
html:
<div class="a">
<span class="icon-arrow-right b"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
<span class=" icon-arrow-right"></span>
</div>