[jQuery] Tree Menu using jQuery
Hi folks
Using the following html;
<ul id="masternav">
<li><a href="stuff">parent link</a>
<ul>
<li><a href="stuff">child link</a></li>
</ul>
</li>
</ul>
Basically I want to show the sub ul when the parent li is clicked.
However I can't seem to hit only the parents, and clicking any link
slides the ul up/down, when I need the sub links to work as normal
links.
Any clues how I should be going about this?
js -------
$(document).ready(function(){
$("#masternav").find("li").toggle(function(){
$(this).find("ul").slideDown("medium");
},function(){
$(this).find("ul").slideUp("medium");
return false;
});
});
Cheers,
steve
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/