I have an overlay that covers the screen with a modal window that pops up over it. With the current code below I get a flash in Firefox before the over lay and modal window fade in. Is there a way to get rid of the flash? I need to wait for the fadeout to be completely done before going visible but i am not sure how.
$(document).ready(function () {
$('#openButton').click(function () {
if ($.browser.msie) {
$("html").css("overflow", "hidden");
} else {
$("body").css("overflow", "hidden");
}
$('#overlay').fadeOut(0);
$('#modalWindow').fadeOut(0);
$("#overlay").css("visibility", "visible");
$("#modalWindow").css("visibility", "visible");
$('#overlay').fadeIn('normal');
$('#modalWindow').fadeIn('normal');
});
});
I think the issue is from the fadeout happening to slow so you see the overlay flash in when I execute the code $("#overlay").css("visibility", "visible");
Any help is appreciated thanks for looking.