我正在尝试重新排序动画的结构。我需要在动画完成后删除 active
类。
我不确定如何对事件进行排队。
$('.object_pagecontent').filter(".active").removeClass("active").stop(true).animate({ marginRight : '-100%' }, 500);
重组的最佳方式是什么?
感谢您的宝贵时间。
最佳答案
使用.animate
的回调
功能:
$('.object_pagecontent')
.filter(".active")
.stop(true)
.animate({
marginRight : '-100%'
}, 500, function(){
$(this).removeClass("active")
});
关于jquery - 更改函数中事件的顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22523593/