I have a div in which I would like to immediately remove all children, but disappear in the new element, but only after all the children have finished disappearing. Using my current code below, the #Message div starts to fade after the first child and is actually placed after the last child. As soon as the last child disappears completely, the #Message div then “jumps” to position. I want to avoid this "jump".
$('#DIV').children().fadeOut("slow", function() {
$('#Message').fadeIn("slow");
});
How can I make sure that the fadeIn () animation does not start until fadeOut () is completed in all #DIV child elements?
Edit: I have to note that my #Message div is inside the #DIV.
source
share