Question

Any idea why this isn't working? The children of the unordered list are not sliding up like I expect..

http://jsfiddle.net/SparrwHawk/vqUgw/3/

Was it helpful?

Solution

here you go bro this looks like what you want:

http://jsfiddle.net/2x2fE/

OTHER TIPS

I was able to fix this by using mouseover and mouseleave with a selector on the children like so:

$(document).ready (function(){
    $('nav ul li').mouseover(function(){
        $(this).children('ul').slideDown()
    });

    $('nav ul li').mouseleave(function(){
        $(this).children('ul').slideUp();
    });
});

There is some error in you code.

Check the fixed one.

$(document).ready (function(){
    $('nav ul li').hover(function(){
        $(this).children("ul").slideDown().
        addClass('shown');
    }, function(){
        $('.shown').slideUp().removeClass(".shown");   
    });
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top