The way it\'s currently written causes the hide to fire over and over if msg.d starts returning \'false\' from \'true\' until enough time has passed for the animation to sto
As above suggest use the ":animated" seclector
if(msg.d == "true") {
var contact = $("#addContactEmailError");
if(!contact.is(":visible") && !contact.is(":animated")) {
contact.show('bounce');
}
$("#addContactSubmitButton").attr("disabled", true);
}
else {
if(contact.is(":visible") && !contact.is(":animated")) {
contact.hide('slide', { direction: "up" });
}
$("#addContactSubmitButton").attr("disabled", false);
}