magoicochea
Junior Member
Posts: 2
Registered: 6/4/2007
Location: Lima, PerĂº
Member Is Offline
|
| posted on 6/4/2007 at 03:58 PM |
|
|
How to hide the menu using javascript?
Hello
I have the menu created at the end of the HTML with the instructions:
<script language="JavaScript">
<!--
new menu (MENU_ITEMS, MENU_POS);
-->
</script>
However, I also have a button whose purpose is to hide the menu. How can I make the Tigra menu dissappear and make it appear once again when the
button is clicked again?
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 6/4/2007 at 05:44 PM |
|
|
There is no documented method to do that by a single function call.
You'll need get the references to the menu's elements and switch their visibility property. See the menu's source code for the naming convention of
the menu's elements.
|
|
|
magoicochea
Junior Member
Posts: 2
Registered: 6/4/2007
Location: Lima, PerĂº
Member Is Offline
|
| posted on 6/4/2007 at 07:57 PM |
|
|
Thanks,
doing this with every item of the A_MENUS collection seems to solve the problem:
for (var n_order = 0; n_order < menu.a_children.length; n_order++)
menu.a_children[n_order].e_oelement.style.display = 'none';
|
|
|