Key |
Default value |
Type |
Use |
scrollDown |
false |
boolean |
Dock when the element goes out by top |
scrollUp |
false |
boolean |
Dock when the element goes out by bottom |
dockToTopFrom |
false |
number |
Dock to top when this value (in px) is reached by scroll |
dockToBottomFrom |
false |
number |
Dock to bottom when this value (in px) is reached by scroll |
stopDockFrom |
false |
number |
Stop docking when the scroll is equal to this value (in px) or more |
stopDockBefore |
false |
number |
Stop docking when the scroll is equal to this value (in px) or less |
marginT |
10 |
number |
Margin to add on top before docking (on scrollDown) |
marginB |
10 |
number |
Margin to add on bottom before docking (on scrollUp) |
dockedClass |
'docked' |
string |
Class name added to the element when is docked |
zIndex |
'auto' |
number |
Z-index added to the element when is docked |
onInit |
false |
function |
Function invoked when the Plugin is turned on |
onStop |
false |
function |
Function invoked when the Plugin is turned off |
onDock |
false |
function |
Function invoked when the element is docked |
onUndock |
false |
function |
Function invoked when the element is undocked |
See the project on GitHub