1

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
  • 1
    jQuery does anything SIMULTANEOUSLY, if you ask it to. What problems are you having getting this to work? Commented Oct 13, 2010 at 11:24
  • I was looking for a method, and found some examples, but non-of them did it simultaneously, so i wanted to ask if its even possible, I am anew to jQuery an JS in general :) Commented Oct 13, 2010 at 11:43

2 Answers 2

3
$.each(ARRAY, function(index, value) { 
  // do amazing things such as:
  $(this).hide(200);
});
Sign up to request clarification or add additional context in comments.

Comments

3

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.