[jQuery] show/hide (as animation effect) behavior inconsistent with other effects?

[jQuery] show/hide (as animation effect) behavior inconsistent with other effects?


I've run across what seems to be several inconsistencies using
.hide(...) as an animation, vs. the other base effects (jQuery 1.1.2).
I'd appreciate it if someone could shed some light on whether the
behavior is intended. Tested in FF2 & IE7, same behavior in both.
$('#myDiv').hide(300).show(300);
...doesn't seem to queue the effects, or maybe it does but there's a bug
in the final state of .hide(delay) so show() doesn't believe it's really
hidden? Unlike the other base effects, .show() & .hide() appear to test
the initial state of the object - see below. Flip-flopping the chained
methods to .show(300).hide(300) displays the queues effects as you would
expect. Next...
$('#myDiv').hide(300,function() {
alert('.');
});
...the callback function does not execute if #myDiv is already hidden.
Same behavior with .show(...) when the object is already visible. I can
see how that might be logical, but wasn't sure because it's a different
behavior from the other animation effects - the callback function
execution of the other base effects are not dependent on the object's
initial state.
Test page here: http://www.carcomplaints.com/show-hide-bug.html
Thanks,
-Wick
--
http://www.CarComplaints.com
What's wrong with YOUR car?
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/






























    • Topic Participants

    • wick