㈠ jquery輪播圖最後一張圖片如何無縫輪播到第一張圖片(輪播順序應和前面一樣,即從左往右),代碼如下:
||$(document).ready(function(){
vartimer=null;
varpic=$(".pic");
varoUl=pic.children("ul");
varaImg=pic.find("img");
varimgWidth=parseFloat(pic.css("width"))||.prop("offsetWidth");
oUl.css("width",imgWidth*aImg.length+'px');
vari=0;
timer=setInterval(function(){
oUl.animate({
"left":"-"+imgWidth+'px'
},500,function(){
oUl.children("li:first").insertAfter(oUl.children("li:last"));
oUl.css("left",0);
});
},1000);
});