I'm trying to make SlideDown or an alternative of that effect to a nav
that is bu default visibilty:hidden
and what i'm doing now is like this:
$(this).find('nav.Menu').css('visibility','visible')
It's working just fine, but i have more submenus and i want an effect when hovering between the main menu to slidedown and up submenus. is this possible without display:none/block
?
JSFIDDLE
I'm trying to make SlideDown or an alternative of that effect to a nav
that is bu default visibilty:hidden
and what i'm doing now is like this:
$(this).find('nav.Menu').css('visibility','visible')
It's working just fine, but i have more submenus and i want an effect when hovering between the main menu to slidedown and up submenus. is this possible without display:none/block
?
JSFIDDLE
.css
in jQuery
– Abude
Commented
Jan 29, 2015 at 15:07
display
the first nav then i couldn't show the child nav, that's why i'm using visibility
– Abude
Commented
Jan 29, 2015 at 15:12
Since your element has visibility: hidden
make it visible
, then hide()
it and call the slideDown()
function:
$('#error').css('visibility','visible').hide().slideDown();
JSFDIDLE
The hover handlers can be:
$("<selector>").hover(function () {
$('#error').css('visibility','visible').hide().stop().slideDown();
}, function () {
$('#error').stop().slideUp();
});
You can try positioning your submenu so it is behind its parent, toggle the visibility, and slide it out from behind the parent. You can reverse the process (slide behind, then toggle visibility) when closing the submenu.