Show Item or Group on Appear (Highlight Item/Group)


When the menu initially appears on the page, you can have an item shown as "selected" (highlighted) or a submenu group appear open (like the "Download" submenu at the example menu above):

show item or group on appear

How?

Either automatically (item selected based on page URL) or manually (by choosing a specific item or group ID, either through the interface or through a variable in the HTML page), as shown in the interface screenshot below:

show item or group on appear

 

The current example demonstrates the javascript variable (through page) method.
(see a different example for the "automatic" method)


We use a JavaScript variable in the HTML code of this page to show the exact item that we want selected:


<script type="text/javascript">var awmShowItem=["show_item_group_on_appear-manual,it4,1"];</script>


This means that the above menu (show_item_group_on_appear-manual.js), shows its subitem "Demo Products" (with ID "it4") as selected, using its "mouse over" state (parameter "1").


NOTE: PLEASE READ THE RELATED ALLWEBMENUS HELP TOPIC FOR MORE INFO AND SCREENSHOTS!

 

Download this AllWebMenus project file.
(works with AllWebMenus 5.1.796 or above)

Note: If you download this project, do not expect to see any value on its "Show Item or Group on Appear" property, as the "selection" is done through the javascript variable on this page.
See the "automatic" example
also, which does use a value on this property.