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