Is there a way to slow down location.reload()?
Currently I’m using .toggle("slow") in in some and .hide("slow") in others to show modal animations. One of the functions calls a refresh but the animation doesn’t complete prior to the reload. It starts and gets halfway finished and then just gets cut off. I like to have it wait until the animation finishes and then reload.
$(".modal-box button").click(function(){
$(".modal-box").hide("slow");
if ($(this).is("#reset")){
location.reload();
}
});
What you should do instead is define a callback function for the animation that will run whenever the animation actually finishes.