javascript - Hide a div after the user clicks on a child menu item -
i'm working javascript menu , need hiding menu after user clicks link in child menu. menu works out of box, except when user clicks button on browser remains stuck open.
the code hides child menu:
divref.style.visibility = "hidden";
i think needs go in section of code:
this.finishopeningchild = function(divref, ulref, maxwidth) { this.ischildmenuopen = true; this.ischildmenuclosed = false; ulref.style.left = "0px"; divref.style.width = maxwidth + "px"; }
how make browser onclick
scenario call: divref.style.visibility = "hidden";
in situation?
not sure in context running, perhaps have statement on page checks see if menu open, , closes if is, happens on page load ... if user clicks button , ends on page below check run ...
if ('hidden' != divref.style.visibility) divref.style.visibility = 'hidden';
Comments
Post a Comment