I have a jQuery function that does a .clone()
on an object, and then an .insertAfter()
and a .slideDown()
on the cloned object. This whole function is wrapped inside a while
loop. I will keep this as short and concise as possible and show a generic example:
while (statement) {
// code for clone and insert ...
$("#newly_created_object").slideDown(500);
}
How can I prevent the next while-loop from firing before the .slideDown()
animation (or any other kind of animation for that matter) ends ?
Thank you in advance !