Pregunta

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/

¿Fue útil?

Solución

here you go bro this looks like what you want:

http://jsfiddle.net/2x2fE/

Otros consejos

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");   
    });
});
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top