- mmItemActiveByShowMenu()
triggers the pagematch based on a passed menu name. For example mmItemActiveByShowMenu("products") would apply pagematching properties to any item whose showmenu property is set to showmenu=products (it is not case sensitive).
- mmItemActivateByText()
triggers the pagematch based on the item's text property. For example, mmItemActivateByText("about us") would apply pagematching properties to any item whose text propery is set to text=about us (it is not case sensitive).
- mmItemActivateByNumber()
triggers the pagematch based on the item's index in the _mi[] array. For example, mmItemActivateByNumber(4) would apply pagematching properties to only one item: the item defined in _mi[4] (which would be the fifth overall menu item, since array indexing starts at 0). This one would be trickier to apply, since you would first have to determine the item index of the menu item you want to affect.
Demos
Because the idea behind the mmpagehighlighter.js module is to trigger pagematching manually, the user must define the event that triggers one of the three functions. It could be a static html link, the onload event, or called through the menu item's clickfunction property.
1) Using a static html link
2) Using the onload event
3) Using a menu item's clickfunction property