I can add a CSS class to each element by iterating them, but is it possible to add the class to all of them at the same time?
Example: Suppose I have 3 elements, when I add the class to 1st element the change would reflect the 1st element only and not the other two. I want it to wait until the same class has been added to other two elements too.
Right now I am doing this:
card1.classList.add('animated', 'rubberBand');
card2.classList.add('animated', 'rubberBand');
But animation for card1
will happen as soon as it is added right? Or my understanding of the reflow is wrong?