4
我想重複從.animate()
開始的鏈接事件(由註釋表示)。寫這個的正確方法是什麼?.each()中的調用函數
$("div").each(function(i, e){
$(this).animate({ left: $(this).parent().width() }, d[i], "linear",
function(){ $(this).css({left: -parseInt($(this).css("width")) })
//would like to call function at this stage
});
})
這結束了工作:
$("div").each(v = function(i, e){
$(this).animate({ left: $(this).parent().width() }, d[i], "linear",
function(){ $(this).css({left: -parseInt($(this).css("width")) })
v();
});
});
這只是什麼我需要做的,它幫助我正確地完成的功能。張貼在上面。 – jeffreynolte 2011-04-20 20:07:10