Well, that's just what you're asking here, when you hover in you fade in,
when you hover out you fade out.

Maybe you should give the hover method the div instead, so when you hover in
the ul you're still hovering in the div.

Michel Belleville


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

> Hello Jquery,
>
> I'm making a simple 1lvl dropdown menu. So far this is what i've got.
> The problem is, I hover the link the ul shows, but i can't hover the
> list item, they disappears as long as i mouseout the main link.
>
> <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(){
>        $('a').hover(function(){
>                $('.news').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