|
home / documentation / reference / repositiononscroll
RepositionOnScroll
- Description:
- Boolean value indicating whether or not the menu should be
repositioned (its default positioning reevaluated) each time the page is
scrolled.
- Value:
- Boolean (true or false), Integer (1=true, 0=false),
or JavaScript expression that returns a boolean value.
- Applies To:
- Menus.
- Browser Compatibility:
- RepositionOnScroll is not supported in Netscape 6.0x.
- Comments:
- RepositionOnScroll menus "slide" into their new positions
gracefully just after the page is scrolled. The speed of the sliding mechanism is
controlled by the ScrollPositionDelay parameter.
When positioning menus that will be set to RepositionOnScroll, keep in
mind that the new position of the menu after the page is scrolled must be
different from the old position in order for any menu movement to take place.
For example, setting RepositionOnScroll to true on a menu
that is displayed at an exact page (x/y) coordinate and that has its
KeepInWindowX/KeepInWindowY parameters set to false will
have no effect; since, after the page is scrolled, the menu position is
reevaluated and it would remain in the same position it was in originally.
For that reason, you should always either overide at least one of the
KeepInWindowX/KeepInWindowY parameters for a RepositionOnScroll
menu, or use the window-based keywords in your menu position parameters.
- Examples:
// Ok:
RepositionOnScroll:true,
RepositionOnScroll:0,
RepositionOnScroll:(window.thisPage=="cf")?1:0,
// if the user defined variable
// "thisPage" is "cf", RepositionOnScroll
// is true
// Incorrect:
RepositionOnScroll:"false", // quotes not allowed around booleans
RepositionOnScroll:"0",
RepositionOnScroll:'(window.thisPage=="cf")?1:0',
// no quoted expressions
- Default:
- false
- See Also:
-
IsFixed,
ScrollPositionDelay,
RepositionInterval,
Menu Positioning Mini-Tutorial
|