小圖標與圖片滾動不相符的解決辦法
next.onclick; prev.onclick函數(shù)在一開始執(zhí)行先判斷是否有animated為true(也就是圖片還在滾動)的情況,如果有這個情況就不做任何處理;代碼如下:
next.onclick=function(){
????if(animated){
????????? return; }
???????? if(index==5){
???????? index=1;
???????? }else{
????????? index +=1; }
???????? showButtons();
????????animate(-600); }
小圖標的問題一樣:在for循環(huán)里animate()方法執(zhí)行前面加上
????????if(animated){
????????return;}
2016-11-14
nice