jquery动画问题

时间:2010-09-30 15:01:04

标签: jquery scroll jquery-animate image-rotation

我需要修改this插件来旋转图片,而无需等待动画结束。如果您访问该链接,您可能会注意到动画在上一个动画结束时重新开始,但我想要图像背靠背,所以我不想等待第一个动画的结束开始下一个动画。知道如何做到这一点。该插件的相关代码段是

el.animate({ left:"-" + el.width() + "px" }, time, "linear", function() {

//reset container position
$(this).css({ left:$("div#imageScroller").width(), right:"" });

//restart animation. Problem is to restart it when last image completey appears with out pausing current animation.
animator($(this), duration, "rtl");

//hide controls if visible
($("div#controls").length > 0) ? $("div#controls").slideUp("slow").remove() : null ;

}); 

1 个答案:

答案 0 :(得分:2)

你必须以完全不同的方式处理这个问题。您要么必须复制所有图像并使用两个容器,一个是完全隐藏的,将其移动到右侧或从左侧弹出图像,并将它们添加到右侧,因为它们从页面上消失。

相关问题