Optional
config: TrackScrollConfigReadonly
destroyUndoes all modifications to the element and returns it to its original state.
You will need to recreate it if you want to enable its functionality again.
Readonly
disableDisables the functionality of the widget. What this means is specific to each widget.
Readonly
enableRe-enables the functionality of the widget. What this means is specific to each widget.
Readonly
getReturns the element passed to the widget constructor.
Readonly
isReturns true if the widget is destroyed.
Readonly
isReturns true if the widget is currently disabled.
Readonly
onThe given handler will be called when the widget is destroyed.
Readonly
onThe given handler will be called when the widget is disabled.
Readonly
onThe given handler will be called when the widget is enabled.
Readonly
toggleRe-enables the widget if disabled, otherwise disables it.
This is a simple wrapper around the ScrollWatcher. If you are using the JavaScript API, you should use the ScrollWatcher directly. The purpose of this widget is to expose the watcher's ability to track scroll and set relevant CSS properties via the HTML API. See ScrollWatcher.trackScroll.
To use with auto-widgets (HTML API) (see settings.autoWidgets), the following CSS classes or data attributes are recognized:
lisn-track-scroll
class ordata-lisn-track-scroll
attribute set on the element that constitutes the widget.Example
This will track scroll on this element and set the relevant CSS properties.