That sounds great. I think in case of my Tooltip plugin there is an additional problem, where a mouseover event doesn't happen when the mouse is over a tooltip element that still fades out. I may be able to fix that with mousemove.
So, if we can get these three fixed and that other issue, the jQuery UI Tooltip would be mostly done. Should I create a ticket for these? Jörn On Sun, Nov 8, 2009 at 12:06 PM, John Resig <jere...@gmail.com> wrote: > So it seems like a couple things would fix your problems: > 1) If fadeIn or fadeOut is called while a partial opacity is shown > then animate to the final state, starting from the current opacity > (right now fadeIn, in particular, won't run). > 2) Make the actual time to run the animation be equal to > currentOpacityDiff * timeToRunAnimation (where currentOpacityDiff is a > number 0 to 1). > 3) Make fadeTo show an element if it's not visible. > > The only remaining issue is to figure out how the queueing should > work. It seems like you would just still need to call .stop() before > running any animation. > > --John > > > > On Sun, Nov 8, 2009 at 11:22 AM, Jörn Zaefferer > <joern.zaeffe...@googlemail.com> wrote: > > Hi, > > > > I've built a testpage to document this issues with fadeIn/Out: > > http://jquery-ui.googlecode.com/svn/branches/labs/fadequeue/index.html > > > > As written on that page, the issues are: > > > > Without using stop(), animations just queue up, thats inacceptable > > With just using stop(), styles end up in the middle, screwing up the next > > fade, that is, stopping a fadeout half way through will cause the next > fade > > in to not fade to 1 > > Using stop(false, true) will finish the animations, which worksaround the > > above problems, but the result is ugly, as a stopped fadeout will skip to > > the end, then fade in again from 0, instead of just fading in from the > > current opacity > > The crazy complicated stuff, using a mix of fadeIn/Out and fadeTo, apart > > from being way too complicated, has the big drawback that the > > fadeTo-animations take exactly as long as the others, while it usually > > doesn't fade from 0 to 1, but only from, say, 0.7 to 1. Adding a > calculation > > to figure out how long the animation should be relative to the current > > opacity would make this just more complicated. > > fadeIn/Out can use opacity values defined in CSS stylesheets, while > fadeTo > > requires the user to specify the opacity > > > > My goal for now is to create a plugin, with your help, that can be used > > instead of fadeIn/Out. It would not queue up animations, it would read > > opacity from stylesheets, just like fadeIn/Out do, and it would adjust > the > > animation duration relative to the current opacity if a fade is > > stopped/reversed, so that if a fade in is stopped half-way through by a > > fadeout, the fadeout would only take half the specified duration, > resulting > > in the same animation speed all the time. > > > > Based on how the plugin ends up, I hope we can port back something to > jQuery > > Core to make that available just as easily as fadeIn/Out. > > > > Looking forward to your ideas. > > > > 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-...@googlegroups.com. > > To unsubscribe from this group, send email to > > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegroups.com> > . > > For more options, visit this group at > > http://groups.google.com/group/jquery-dev?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > "jQuery Development" group. > To post to this group, send email to jquery-...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/jquery-dev?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@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.