I'm often running into the same issue, trying to play with the
optional parameters of .stop(), with varying success.

On Sep 22, 11:47 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
wrote:
> fadeIn() and fadeOut() cool be much more useful if they'd work
> together instead of queueing up against each other. A usecase where
> this comes up is a tooltip widget, where a single element is reused to
> display the tooltip of various elements (absolutely necessary for a
> large number of tooltipped elements, eg. a large table).
> An example of that usecase, implementing an ugly workaround to get the
> queuing under control, is 
> here:http://jquery-ui.googlecode.com/svn/branches/dev/tests/visual/tooltip...
>
> The relevant code of the workaround is this:
>
> open: function(target) {
>         [...]
>
>         if (this.tooltip.is(":animated"))
>                 this.tooltip.stop().show().fadeTo("normal", this.opacity);
>         else
>                 this.tooltip.is(':visible') ? this.tooltip.fadeTo("normal",
> this.opacity) : this.tooltip.fadeIn();
>
> },
>
> close: function() {
>         [...]
>
>         if (this.tooltip.is(':animated'))
>                 this.tooltip.stop().fadeTo("normal", 0);
>         else
>                 this.tooltip.stop().fadeOut();
>
>         [...]
>
> }
>
> Where "this.opacity" refers to the opacity value, read in _init:
>
> this.opacity = this.tooltip.css("opacity");
>
> Thats necessary to use the CSS defined opacity value, instead of just
> fading to 1.
>
> As you may guess, that workaround isn't easy to come up with - I've
> written it some time ago and have no idea why it works. I don't think
> this makes sense as a plugin, so I hope we can come up with an idea to
> improve fade support in core, to be available and useful for everyone,
> not just someone who knows where to copy the workaround from.
>
> Jörn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to