Hello! I'm newbie in jquery, and have some troubles with menu constructions. When I try to make simple dropdown menu with this structure:
- .submenu {display:none;}
- $(document).ready(function(){
- $(".menu").hover(function(){
- $(".submenu").slideToggle("slow");}) //any effect
- ;})
- <ul><li><a href="#" class="menu">Main articles</a>
- <ul class="submenu">
- <li><a href="#">Article1</a></li>
- <li><a href="#">Article2</a></li>
- <li><a href="#">Article3</a></li>
- </ul></li></ul>
I get working sliding menu with 1 error - hovering the child ul element - collapse menu, because I hover out .menu element. And I can't understand how to make simple menu with sliding on hover and "remember" of it when I hover child element. Please help me with it.