同时衰落多个元素-jQuery [英] Fading multiple elements simultaneously - jquery
本文介绍了同时衰落多个元素-jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要执行以下操作:
$(newPanel, prevBtn, nextBtn, infoPanel).fadeIn(200, function() {
}
这些var是使用jquery创建的div
these vars are divs created with jquery
但是只有第一个元素淡入,我真的需要所有元素同时淡入.
but only the first element fades in, I really need all elements to fade in at the same time.
推荐答案
您可以使用add
方法来获取同一jQuery对象中的元素:
You can use the add
method to get the elements in the same jQuery object:
newPanel.add(prevBtn).add(nextBtn).add(infoPanel).fadeIn(200);
这篇关于同时衰落多个元素-jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文