我有一个jquery代码,要求我对元素及其子元素及其子元素应用相同的更改。我目前正在3个声明中这样做:
$(this).animate();
$(this).children().animate();
$(this).children().children().animate();
其中所有三行都执行相同的动画而不排队。有没有办法在一个声明中做到这一点?
答案 0 :(得分:1)
那怎么样?
$(this).find("*").andSelf().animate();