as4s1n
New Member
- Messages
- 174
- Reaction score
- 4
- Points
- 0
I am working on a hover menu using jQuery. For some reason nothing seems to work. What I want it to do is when you hover over the anchor tag the ol that is after it will expand revealing the contents of that subject header and retract when it is mousedout. I have no idea what is wrong.
JQuery:
HTML:
Here is a link to a live site.
Thanks
JQuery:
Code:
$(".HM_menuItem ol").hide();
$(".HM_menuItem a").hover(
function() {
$(this).find("ol").slideToggle();
},
function() {
$(this).find("ol").slideToggle();
}
);
HTML:
HTML:
<div id="navi-menu">
<div class="HM_menuItem">
<a href="#">Root 1</a>
<ol>
<li>Child 1</li>
<li>Child 2</li>
</ol>
</div>
<div class="HM_menuItem">
<a href="#">Root 2</a>
<ol>
<li>Child 1</li>
<li>Child 2</li>
</ol>
</div>
</div>
Here is a link to a live site.
Thanks
Last edited: