(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Is it possible set a pressed utem when you have multiple drop down menus on the page?

Return to Recent Questions


Q: Is it possible set a menu item to pressed when a page is loaded when you have multiple drop down menus on the page? �

I have 2 menus side by side and I was able to set the pressed item with the JavaScript API as described in your FAQs but when I try to show an item as pressed �in a second menu on the same page, the corresponding item in the first menu shows as pressed. Is there a different function that I can use for this or a way to reset the menu ID in the second menu to start from where the first menu left off so I can use the same function?

A: See the first parameter in
dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
function is index of the menu.

So, if you use several menus on the one page you should use different menuInd parameter.

For example you have:

<script type="text/javascript" src="menu/data1.js"></script> //menuInd=0
...
<script type="text/javascript" src="menu/data2.js"></script> //menuInd=1
...
<script type="text/javascript" src="menu/data3.js"></script> //menuInd=2
...
<script type="text/javascript" src="menu/data4.js"></script> //menuInd=3

So, for the second menu you should write:

dm_ext_setPressedItem (1, 2, 5)






Return to Recent Questions

Related:
Exceptional MP4 to HTML5 Converter Review Exceptional Bootstrap Mobile Template Set  |  Prime Simple Website Builder Review  |  Fine Bootstrap Page Templates - Video List  |  Great Free Page Layouts Set  |  Super Simple Website Builder Review  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. AI Website Builder | Best AI Website Builder | AI Website Generator | AI Website Builder | AI web page design generator