According to http://docs.jquery.com/Effects/stop you'd better use stop this
way : .stop(true, true).

Your problem was the animation could be stopped halfway through the fadeIn
and keep an opacity value way too transparent to let the element appear
again next time you tried to fade it in again.

Michel Belleville


2009/11/17 runrunforest <[email protected]>

> THanks Michel, changed the selector slightly, it works. But only half.
>
> The problem now, if i hover in and out multiple times the list will
> disappear permanently.
>
> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/
> libs/jquery/1.3.2/jquery.min.js<http://ajax.googleapis.com/ajax/%0Alibs/jquery/1.3.2/jquery.min.js>
> "></script>
> <script type="text/javascript">
> $(function(){
>         $('div').hover(function(){
>                $(this).children('ul').stop().fadeIn(333);
>         }, function(){$('.news').children('ul').stop().fadeOut(333);
>        });
> });
>
> </script>
>
> <div class="news" style="position:relative">
>        <a href="#" class="me">NEWS></a>
>        <ul style="position:absolute; display:none">
>                <li><a href="#">Real Estate</a></li>
>                <li><a href="#">Your Home</a></li>
>                <li><a href="#">Real Estate</a></li>
>                <li><a href="#">Your Home</a></li>
>        </ul>
> </div>
>

Reply via email to