Hide menu after click?
Hide menu after click?
I am using Easy CSS Menu. I have the links load into an iframe on the same page below the menu. Some of my menus are large and cover up the content when they are expanded. After clicking on a menu item that loads a link in the iframe, the menu doesn't hide....and it covers the content.
How do I make the menu auto hide after a link is clicked?
Thanks!
How do I make the menu auto hide after a link is clicked?
Thanks!
Re: Hide menu after click?
If you're using JavaScript to load URL to iframe then you can call:
EBMMMenu.hide()
EBMMMenu.hide()
Blumentals Software Programmer
Re: Hide menu after click?
Thanks! I am not using javascript to load the URLs, but I can change that.I know very little about javascript, I got the page to load, but where would I put the EBMMMenu.hide() function?
<li id="123" class="gradient_menuitem gradient31 first_item"><a href="http://example.com/page1.html" target="Articles" title="" onclick="replaceIframeURL('Articles', this.href); return false" >Page 1</a></li>
<li id="123" class="gradient_menuitem gradient31 first_item"><a href="http://example.com/page1.html" target="Articles" title="" onclick="replaceIframeURL('Articles', this.href); return false" >Page 1</a></li>
Re: Hide menu after click?
When editing the menu in EBMM, in URL field put:
javascript:replaceIframeURL('Articles', this.href); EBMMMenu.hide();
The "javascript:" in front will tell EBMM that this is not simply an URL but script.
javascript:replaceIframeURL('Articles', this.href); EBMMMenu.hide();
The "javascript:" in front will tell EBMM that this is not simply an URL but script.
Blumentals Software Programmer
Re: Hide menu after click?
Just to be clear, I am using Easy CSS Menu 4.0, not EBMM. I couldn't get it to work in the tool, but I was able to manually adjust the HTML to call the hide function.
The hide function works, but the very next time I go to the menu, it drops down with the values pre-chosen from last time....and the 3rd level is on top of the second level.
I have included some screenshots of the way the menu looks during first click, and then second click after calling hide function. It doesn't look correct.
First click looks OK

Subsequent clicks look wrong

The hide function works, but the very next time I go to the menu, it drops down with the values pre-chosen from last time....and the 3rd level is on top of the second level.
I have included some screenshots of the way the menu looks during first click, and then second click after calling hide function. It doesn't look correct.
First click looks OK

Subsequent clicks look wrong

Re: Hide menu after click?
Can you put it somewhere online and send me a link?
Blumentals Software Programmer
Re: Hide menu after click?
Yes, I will PM you the link.
Re: Hide menu after click?
That solved the issue. Thanks for your help!
Re: Hide menu after click?
i am having the same problem how can i say
if you want a link nadkuantum.com
if you want a link nadkuantum.com
Re: Hide menu after click?
They were using Javascript links instead of the regular links before. You could try doing the same:
Change links "page.html" to:
javascript:window.frames['koc'].location.assign('page.html');EBMMMenu.hide();
The first part will load the link in your iframe, the second part will close the menu.
Change links "page.html" to:
javascript:window.frames['koc'].location.assign('page.html');EBMMMenu.hide();
The first part will load the link in your iframe, the second part will close the menu.
Blumentals Software Programmer