Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / reference / hm_onitemhover

HM_OnItemHover

Description:
The custom (user defined) method that is called whenever a menu item hover timer fires.

Value:
JavaScript function.

Applies To:
Menu Items.

Browser Compatibility:
HM_OnItemHover is supported in all browsers.

Parameters:
(itemEl)

itemEl is the HTML element for the menu item

Comments:
HM_OnItemHover is a HierMenus Menu Event Hook; a means for you to execute your own custom JavaScript code from within normal HierMenus processing. All menu event hooks expect to be set to the name of a custom function (typically of your own creation, although the HM_Loader.js file contains some custom functions designed for use with event hooks), a function literal, or a dynamically generated function.

The function you create for use with this menu event hook should be designed as a method of the item object, i.e., the internal item object that HierMenus creates to track the various unique parameters of the item itself. Thus, the this keyword, within the context of your custom function, refers directly to the item object.

The item object (referred to by this) is not the same as the item element. The item object is the internal structure that HierMenus uses to track various pieces of information specific to this item. The item element is the actual HTML page element that represents the item itself. You access the item object via the this keyword within your custom method; you access the item element via the first parameter passed to the function.

When using HM_OnItemHover note that it is not guaranteed that the action that is being called for is strictly necessary on the menu item. For example, HierMenus may trigger a hover timer when the menu item's child menu is already visible.

HM_OnItemHover will fire on all menu items when their alloted hover time (HoverTimeMilliSeconds) has expired, or in other words, when the user hovers over the menu item for the time alloted in HoverTimeMilliSeconds. HM_OnItemHover will fire after the alloted hover time for all menu items, whether the menu item has a child menu or not.

For further usage and implementation information, see the mini-tutorial Menu Event Hooks.

Example Method:
// write a comic message to the 
// status bar when the user hovers over a 
// menu item
function HM_fc_ItemHover(itemEl) {
   window.status="Sorry, no loitering.";
}
Example Settings:
// Ok:
HM_OnItemHover:HM_fc_ItemHover,
HM_OnItemHover:null,  // remove hook for this item

// Incorrect:
HM_OnItemHover:"HM_fc_ItemHover",
   // do not quote function names here
HM_OnItemHover:"null", 
   // do not quote null here
Default:
null

See Also:
HM_OnVisibilityToggle, HM_OnMove, HM_OnCreateMenu, HM_OnMenuCreated, HM_OnItemHilite, HM_OnBuildMenus, HM_OnItemClick, HM_OnCreateItem, HM_OnItemCreated, HM_OnMenuOver, HM_OnMenuOut, HM_OnItemOver, HM_OnItemOut, HM_OnLink, setTrans, killTrans, Menu Event Hooks Mini-Tutorial



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/hm_onitemhover.html