Here's the function, which I am calling like this: $(document).ready(function(){ dropdownmenu(); });
function dropdownmenu() {
$("#navigation ul li.upper").hover(function(){
$("ul.submenu", this).show(400);
},function(){
$("ul.submenu", this).hide();
});
}
How can I optimize this function, specifically preventing animation queuing and making it fire properly on page load? Any other tips would ask be welcome!
Last, but not least, the markup:
<ul>
<li>...</li>
<li class="upper">
<a href="#">Example</a>
<ul class="submenu">
<li><a href="#">Sub-example</a></li>
</ul>
</li>
<li>...</li>
Thanks in advance!