在我双击/高音/等单击 .next 按钮运行脚本的那一刻,我需要它一个接一个地排队吗?我怎样才能做到这一点,以便在重新开始之前完成该功能?
HTML
<ul id="one" class="first selected">
<li class="pic_one"></li>
<li class="pic_two"></li>
<li class="pic_three"></li>
</ul>
<ul id="two">
<li class="pic_one"></li>
<li class="pic_two"></li>
<li class="pic_three"></li>
</ul>
<ul id="three" class="last">
<li class="pic_one"></li>
<li class="pic_two"></li>
<li class="pic_three"></li>
</ul>
jQuery
$('.slider .next').click(function(){
if($('.slider ul.selected').hasClass('last')){
// leave blank
} else {
$('.slider ul.selected').hide('slide', { direction: "left" }, 1000);
$('.slider ul.selected').removeClass('selected');
$('.slider ul').parent().next('ul').show('slide', { direction: "right" }, 1000).addClass('selected');
}
});