I am writing a script that does animations on a web-page. In the process I need to add several elements to an array, and then simultaneously animate them.
Is it possible to use jQuery to SIMULTANEOUSLY animate all objects in an a开发者_运维问答rray? Or maybe there's a better method for that?
Thanx
$.each(ARRAY, function(index, value) {
// do amazing things such as:
$(this).hide(200);
});
If you have several DOM elements in an array, all you need to do is slip them into a jQuery object, and do your animation.
$( arrayOfElements ).fadeOut();
精彩评论