 |
Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
|
|
 |

|
 |
 |
|
home / documentation / reference / topmenux
TopMenuX
- Description:
- The horizontal (left) pixel position of the menu when
the menu is being displayed as a top level menu.
- Value:
- Integer, null, JavaScript expression that
returns an integer, or String JavaScript expression that returns
an integer.
- Applies To:
- Menus.
- Browser Compatibility:
- TopMenuX is supported in all browsers.
- Comments:
- Note that this parameter defines the menu's left pixel position
(in relationship to the HTML document) when the menu is being displayed as
a top level menu. Compare this parameter to ChildMenuX,
which defines the menu's left pixel position when the menu is used as a
child menu. A single menu can be used as both a top level
menu and a child menu on the same page. This Child vs. Top
distinction allows you to define different settings depending on how
the menu is currently being utilized.
When using a String JavaScript expression (i.e., a JavaScript expression
contained within quotes), that expression will not be evaluated until
just before the menu is positioned. It will then be reevaluated every time
the menu is repositioned or redisplayed. Thus, a string JavaScript expression
can be crafted to return a different, custom result dynamically each time
the menu is positioned. Other JavaScript expressions (not enclosed in quotes)
are only evaluated once when the page is first loaded.
Special keywords can be utilized in String JavaScript expressions that allow
you to fine tune the positional display of the menus, including
HM_default_x_position, HM_default_y_position, HM_window_top_edge,
HM_window_right_edge, HM_window_bottom_edge, and HM_window_left_edge.
In addition to these keywords, HierMenus version 6 provides two custom functions
in the HM_Loader.js file; HM_f_GetMenuDimension and
HM_f_GetElementXY that allow you to position menus based on their
width or height (handy for bottom or right edge based positioning) or the
location of some other element within the page (handy for relative positioning).
Each of these uses is discussed further in the mini-tutorial
Menu Positioning.
The integer provided (or returned from a JavaScript expression) is always
interpreted as the left pixel location of the menus. You must provide only
an integer or an expression that returns an integer.
- Examples:
// Ok:
TopMenuX:100,
TopMenuX:null, // revert to default
TopMenuX:"HM_default_x_position+10", // reevaluated as needed
TopMenuX:"MyCustomFunction('foobar')", // call your own function
TopMenuX:(HM_IE)?10:20, // evaluated only once on page load
// Incorrect:
TopMenuX:"100",
TopMenuX:HM_default_x_position+10, // must have quotes to use keywords
TopMenuX:20px,
- Default:
- null
Note that setting TopMenuX to null is equivalent to setting
it to "HM_default_x_position"; i.e., the following two settings
result in the same value:
TopMenuX:null,
TopMenuX:"HM_default_x_position",
- See Also:
-
TopMenuY,
ChildMenuX,
ChildMenuY,
Menu Positioning Mini-Tutorial
|
|