Consider this
<ul>
<li>some menu
<ul>
<li>some submenu</li>
<li>some submenu</li>
<li>some submenu</li>
<li>some submenu</li>
</ul>
</li>
</ul>
if I hover and make a fadeOut fadeIn when you go over some menu so that
the submenu come in. How do I prevent that if the mouse go's out of the
block and backin before the animation is ended. The result is that the
animation will keep looping or give strange behavior. How do I prevent that?
Brandon Aaron schreef:
> I'm having trouble following but you should be sure to use the hover
> event $().hover(overFunction, outFunction) instead of a sperate
> mouseover and mouseout and there is no need to set display: none or
> display:block as the fadeOut and fadeIn methods already do this.
>
> --
> Brandon Aaron
>
> On 10/12/06, Onno Timmerman <[EMAIL PROTECTED]> wrote:
>> Imagine I have a menu system. You go over with the mouse and a menu
>> "fadeIn" then you go down over the menu and over the edge so that the
>> menu will "fadeOut" again. But before its faded out you go back up with
>> the pointer.
>>
>> The animation will do now two thing. It will fade out but as soon it
>> there it will think, hé there is a mouse over me lets fadeIn. When again
>> fadedIn it will restart fading out.
>>
>> How do I prevent this behavior from happening. I already did
>> fadeOut("slow", functio(){$(this).css("display", "none");}...
>>
>> etc... Surley this is a common thing. Maybe it would make up a good
>> tutorial about how to prevent this!
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/