【发布时间】:2013-02-27 20:48:07
【问题描述】:
如何在 ie7 和 8 中制作 Jquery 连续循环动画? (ie9/chrome 工作正常)
这是我的代码
$(document).ready(function() {
var $grower = $('#rain');
function runIt() {
$grower.animate({left:'48%',top:'800px',opacity:'0'}, 1000, function() {
$grower.removeAttr("style");
setTimeout(function() {
runIt();
}, 100);
});
}
runIt();
});
【问题讨论】:
-
在 IE7/8 中能运行一次,完全没有报错吗?
-
试试 $grower.css({opacity: 1,left:'auto',top:'auto'});而不是 removeAttr('style')
标签: jquery jquery-animate