I am changing several divs in a loop with animation () in jQuery. At the same time, I am moving (property left, no resizing) the div where they are contained.
The problem is that even though they have the same duration, resized animated calls end before the call forwarding. They are not synchronized. Is there a way to create a list of selectors and its properties and then run a unique call to animate ()?
Or is there an alternative to make multiple animations at once?
I saw there a property called a step, which happens every time an animation loop occurs, but, again, each call to animimate () has its own step.
Thanks in advance:)
Here is an example of pseudocode if necessary:
for(...){
$(target_x).stop().animate({property_a:random_value, property_b:random_value}, {duration:300});
}
$(container).stop().animate({property_z:random_value}, {duration:300});
ozke source
share