Hi Daemach,
I came across the same problem and agree that it is counter-intuitive.
In the meantime I have implemented a filter on the visibility of the
element before calling the function. e.g. $("#myDiv:visible").slideUp();
Regards,
David
Daemach wrote:
I'm working with the fade and slide animations now, and while testing I've
hit a couple of points where an element tried to slideIn when it was already
... in, and fadeOut when it was already...out. In both cases the animation
starts from the beginning, fully hiding the element and sliding it in or
showing the element and fading it out. Now I know I can handle it in my
code, but the behavior seems a little less intelligent than it could be. If
someone calls a fadeout function the end result is display:none - likewise
for a slideup. Therefore, if the element style is already display:none the
function is technically successful. Can this check be worked into the core
logic? It would make the library feel smarter.
Dealing with chaining animations through callbacks is already difficult
enough for new people without having to deal with this :)
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/