Hiermenus Go Forth, VI - DHTML Lab | 10
Hiermenus Go Forth, VI:
Version 4 - The Page-Specific Parameters (cont'd)
HM_PG_ChildOffset
- Description
- Sets the vertical distance for positioning a child menu over its parent menu, measured from the top of the parent item.
All menu trees in the page are affected.
HM_PG_ChildOffset overrides site-wide global settings declared in the external script.
- Value
- Pixels.
May be specified as:- integer
- string
- string JS expression to be evaluated
- Example Values
- integer: 10
- All child menus will be positioned 10 pixels lower than their parent item.
string: "5"- All child menus will be positioned 5 pixels lower than their parent item.
JS expression: "getChildOffset()"- A custom function that you have created will be called. The return value of this function will be the HM_PG_ChildOffset parameter, and all menus in the page will comply.
JS expression: "(IE4) ? ((document.body.clientHeight>600) ? 20 : 10) : ((window.innerHeight>600) ? 20 : 10)"- The complete JS code is included in the parameter declaration. In the above example, HM_PG_ChildOffset will be 20 if the browser window is more than 600 pixels high, and 10 if it is not.
- Default
- If this parameter is omitted, the relevant Global Parameter value set in the external script is used.
- Differences from Version 3 equivalent
- The childOffset parameter in Version 3:
- accepted only integer values.
- was mandatory.
- Comments
- If you do not want your child menus to be positioned lower than the parent item, give HM_PG_ChildOffset a value of 0.
To position your child menus higher than the parent item, give HM_PG_ChildOffset a negative value (ex:HM_PG_ChildOffset = -10 .)
Next, HM_PG_TopSecondsVisible.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: Dec 12, 2000
Revised: Dec 12, 2000
URL: https://www.webreference.com/dhtml/column42/7.html