That is pretty disappointing, that is a lot of code to stop an animation. i guess i need to rethink on mootools.
Karl Swedberg-2 wrote: > > > > On Aug 13, 2007, at 8:40 PM, Joel Birch wrote: > >> On 8/14/07, Joel Birch <[EMAIL PROTECTED]> wrote: >> On 8/14/07, Eridius <[EMAIL PROTECTED]> wrote: >> >> That help quite a bit but still not the effect i am looking for. I >> know this >> is ironic but i am looking for the effect on this home page on the >> right >> hand side: >> >> http://mootools.net/ >> >> The thing that that effect has and this one does not is the is >> stops the >> effect once the mouse leaves if i move over a link real fast and >> then leave >> it. in my code it perform the full effect even if my mouse is over >> it right >> away. is there a way to stop the effect from fully complete if the >> mouse is >> move in and then out real fast? >> >> Would you like to take this one Karl ;) >> >> Joel. >> >> Seriously though, I think you will find that jQuery can not >> currently stop animations mid-way through. If it begins, it will >> animate fully and then remember to do the closing animation if you >> moused out in the meantime. I think the ability to stop animations >> mid-way is planned for a future release of jQuery. >> >> In the meantime I highly recommend looking at Brian Cherne's >> hoverIntent plugin as it will definitely help cut down on >> triggering unwanted animations for menus like this. > > haha, very funny, Joel. :-) > > I hope Ganeshji Marwaha doesn't mind my pasting a previous email of > his that answers the same question: > >> 1. There is a plugin called hover intent. The primary purpose of >> this plugin is to stop these kind of actions on unintentional hovers. >> So, you can allow the user to move the mouse over ur link, and when >> it is clear that the users intention is to actually use the link, >> the hover event is fired. This can solve your problem although, >> this might not be what you are looking for. >> >> 2. You can unbind the mouseover event when the animation starts and >> in the animation end callback you can bind the handler again. Same >> can be done for mouse out as well. This way if the user mouseovers >> the link, the unbind event happens and the animation starts. During >> this time if the user hovers over it again and again, your handler >> wont be called because you have unbound it already. Once the >> animation is done, attach the handler again. > > And you can see an implementation of suggestion #2 in Ganeshji's > jQuerified version of another Mootools accordion thingie: > > http://www.gmarwaha.com/jquery/jkwick/test/test.html > > Just have a look at the source js. That should get you going in the > right direction. > > This questions has been asked a lot lately. Anyone up for adding it > to the frequently asked questions list? :) > > > --Karl > _________________ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > > > > -- View this message in context: http://www.nabble.com/What-is-wrong-with-this-code--tf4264306s15494.html#a12137226 Sent from the JQuery mailing list archive at Nabble.com.