views:

46

answers:

2

Hello, 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 array? Or maybe there's a better method for that?

Thanx

+2  A: 
$.each(ARRAY, function(index, value) { 
  // do amazing things such as:
  $(this).hide(200);
});
Júlio Santos
+1  A: 

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();
patrick dw