标签:
$(document).ready(function(){
$(window).on(‘load‘,function(){
$(‘#next‘).click(changesSales);
});
});
var i = 0;
function changesSales(){
var a = $(‘.showPic‘),picLens = a.length;
a[i++].style.display = ‘none‘;
// 若 i >= 图片的总长,进行下一次切换
if(i >= picLens){
i = 0;
}
a[i].style.display = ‘block‘;
}
标签:
原文地址:http://www.cnblogs.com/xiaxiaxia/p/4742315.html