1
我想創建一個函數,我可以調用它來一個接一個地翻轉多個圖像。關於我在做什麼錯的想法?在此先感謝jquery翻轉多個圖像
function flipImage(totCount, flipCount) {
totCount--;
var cnt = flipCount;
cnt++;
var id = '#flip'+cnt;
$(id).flip({
speed:400,
color: 'red',
direction: 'rl',
onAnimation: if (cnt > 0){flipImage(totCount, cnt)},
onEnd: function() {
$(id).show(400);
}
});
}
什麼不在代碼中工作? – 2013-03-23 04:06:16
它說在onAnimation語法錯誤:if(cnt> 0){flipImage(totCount,cnt)}, – daved 2013-03-23 04:09:50
是的,這是正確的...它會給你錯誤.. – 2013-03-23 04:11:12