开发者

jQuery SIMULTANEOUSLY animate all objects in an array

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜