Im using some Jquery to fadeout an element, however i would like to keep the layout so am trying to apply a visibility:hidden to the CSS class after the fadeOut.
However this doesnt seem to be working, the element is still being set to display:none.
I know i could get around this by adding a wrapping div around the element but to be honest, its a lot of effort and id rather just find a solution through jQuery rather than going back in to edit the HTML
Ive tried the following:
$("#mmoverlaycenter").fadeOut().css("visibility", "hidden");
$("#mmoverlaycenter").css("display", "initial");
Reason for doing seperate lines is that declaring multiple CSS changes seemed to keep throwing up syntax errors.
To my mind this should work, however the element ends up with the following styling:
<div id="mmoverlaycenter" style="visibility: hidden; display: none;">
One idea ive had is that the fade animation takes time to complete, so animation starts running, other style properties are applied, then animation finishes and applies display:none.
What do you think?
cheers