Hi Alex,

Instead of
        $('this > ul')
try
        $('> ul', this)



--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Oct 15, 2008, at 6:49 PM, Alex wrote:


Hey guys,

I have a menu like this:

<li><a href="#">Test</a>
 <ul>
   <li><a href="#">Another</a></li>
   <li><a href="#">Another</a></li>
   <li><a href="#">Another</a></li>
 </ul>
</li>
<li><a href="#">Test</a>
 <ul>
   <li><a href="#">Another</a></li>
   <li><a href="#">Another</a></li>
   <li><a href="#">Another</a></li>
 </ul>
</li>

I want to be able to hover over a <li> and have its corresponding
child 'ul' show.

I have tried this jQuery but it won't work, any ideas why?

$(document).ready(function(){
 $("li").hover(function(event){
   $("this > ul").show();
 });
});

I'm guessing it's my interpretation of the 'this' selector but I need
a hand...

Thanks,
Alex

Reply via email to