I’m wondering when the jQuery selector returns multiple elements and I do a “slideDown” for example on all those element…
$('.allthisclasss').slideDown();
Is there a single loop of code that moves all objects down in synch or if jQuery treats all objects separately and they each have a thread of execution to move themselves?
My question is about animation optimization and it would be great if there were only one timer for all objects instead of one per objects.
Anyone knows how jQuery handles this situation?
I finally have the answer: There is only one timer that animates everything in the page. If there is something in the queues, a timer is created that moves everything and as soon as everything is done, the timer is killed:
HTML Used:
JavaScript Used:
Tests case:
Test 1
Test 2
Test 3
Test 4
Thanks