Hey guys, I'm trying to create 1 really simple function but it just
doesn't work!
function showMenu(menu) {
var menuid = $( "#"+menu );
var menuRoot = $( "#"+menu+"-root" );
menuid.toggle();
menuRoot.blur();
}
What this suppose to do is when you click a link, it will change
settings of a specific div to "visible"
The HTML:
<a id="stuff-root" class="baritem" href="javascript:void(0)"
onclick="showMenu('stuff');">My Account</a>
<div id="stuff">
<a href="##">My Account</a>
<a href="##">More stuff</a>
<a href="##">Here is a menu item</a>
<a href="##">Here is a menu item</a>
<a href="##">Here is a menu item</a>
<a href="##">Here is a menu item</a>
</div>
Why doesn't this work? What am I doing wrong.. When I alert this, I
get the correct div ids?