New :visible/:hidden breaks my site. Workarounds?
Hello.
After using v1.2.6 for a while I decided to switch/try 1.3.x, and replaced it with 1.3.2.
And I started to notice some "strange" behavior. But apparently is not strange, it's just re-written :visible/:hidden part.
So for example this piece of html:
-
<div id="login-form-cnt">
<form>login form</form>
</div>
<div id="comm-form-cnt">
<form>comments form</form>
</div>
What I want to do is to hide/fadeOut the entire #login-form-cntafter some operations and show/fadeIn #comm-form-cnt (after I made an Ajax request to validate users user/pass for example). I'm doing using this code:
-
$('#login-form-cnt').fadeOut('slow', function () {
$('#comm-form-cnt').fadeIn('slow');
});
So, hide/fadeOut are _not_working. The callback function _is_ called and in my case comments form is displayed, but login form remains. My guess would be that jquery checks if it's visible or not 1st, and apparently it thinks that desired DOM is already hidden.
Very simple, imho. But it doesn't work anymore with 1.3.2. It works with 1.3.1 though (see ":visible/:hidden Overhauled" on
http://docs.jquery.com/Release:jQuery_1.3.2
)
For Firefox a small hack would be to add style="width:1;height:1px;", but IE doesn't like it, it behaves differently and breaks formatting.
So, for now I can stick with 1.3.1, but I was wondering if there is another solution, as I would like to be able to update jquery in future.
Thank you in advance.