You just need to set a flag right before the animation starts ...
something like:

var isAnimating = true;

Then in the callback of the animation ... just set it to false.

The mouseout would need to check isAnimating before being allowed to
do anything.

--
Brandon Aaron

On 5/17/07, Daemach <[EMAIL PROTECTED]> wrote:

That plugin is cool - I looked at it before.  Unfortunately I'm
triggering the close and open from two different elements and using
the mouseout event on the menu itself to close.  The problem is that
if the mouse leaves the object, it starts the slide animation.  If the
mouse grazes the div even slightly, it restarts the animation
triggering another mouseout event (the menu resets to max height and
starts shinking until it is no longer under the mouse and another
event is triggered...) and that repeats ad infinitum, or at least
until you move the mouse.

I need to figure out a way to ignore mouseouts until the slide
animation is complete :/

On May 17, 1:18 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> My hoverIntent plug-in may help... but in the opposite way of thinking about
> your problem -- it delays the onMouseOver call until the users cursor comes
> to rest (or slows significantly) over the target object.
>
> http://cherne.net/brian/resources/jquery.hoverIntent.html
>
> Brian.
>
> On 5/17/07, Daemach <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a slightly different problem - I have a vertical menu that gets
> > displayed when you mouse over a link using slideDown.  I attached a
> > slideUp event to the mouseout event of the containing div, but if the
> > pointer moves back over the menu before the animation is done it
> > restarts the animation repeatedly until you move the pointer.  Any
> > ideas on how to solve that one?  It looks very strange.
>
> > On May 17, 9:37 am, "John Resig" <[EMAIL PROTECTED]> wrote:
> > > Isn't that what .hover() does?
>
> > > $(...).hover(function(){
> > >   $(this).addClass("hilite");}, function(){
>
> > >   $(this).removeClass("hilite");
>
> > > });
>
> > > --John
>
> > > On 5/17/07, Remy Sharp <[EMAIL PROTECTED]> wrote:
>
> > > > I've written a plugin that will fire a mouseout when the mouse leaves
> > > > the container DIV, rather than moves over a sub-element:
>
> > > >http://remysharp.com/2007/05/17/true-mouseout-jquery-plugin/
>
> > > > Hope it helps.
>
> > > > On May 16, 1:36 pm, SamCKayak <[EMAIL PROTECTED]> wrote:
> > > > > Just getting started...
>
> > > > > I have several unordered lists on a page.  I want to add a class
> > > > > 'hilite' to an ordered list onmouseover and remove the class
> > > > > onmouseout.
>
> > > > > So far, so good.  My problem is that while the mouse is inside the
> > > > > ordered list, an onmouseout event fires when the mouse moves over a
> > > > > list item (but is still inside the ordered list).
>
> > > > > What methods are available to detect this condition as I do not want
> > > > > to removeClass('hilite') while I am in the ordered list but hovering
> > > > > over a list item?
>
> > > > > Thanks,
>
> > > > > Sam


Reply via email to