Optionalconfig: ScrollToConfigReadonlydoScrolls the main scrolling element to the element's position.
ReadonlytoggleScrolls the main scrolling element to the element's position, if it's not already there, or otherwise scrolls the main scrolling element to the previous saved scroll position.
ReadonlyundoScrolls the main scrolling element to the last scroll position before the action was done. If the action had never been done, does nothing.
Scrolls to the given element or to the previous scroll position.
To use with auto-widgets (HTML API) as part of a trigger specification:
offsetX: A number.offsetY: A number.duration: A number.scrollable: A string element specification for an element (see getReferenceElement). Note that, unless it's a DOM ID, the specification is parsed relative to the element being acted on and not the element the trigger is defined on (in case you've used theact-ontrigger option).NOTE: Do not place a + sign in front of the offset values (just omit it if you want a positive offset). Otherwise it will be interpreted as a trigger option.
Example
When the user clicks the button (click target), scroll the main scrolling element to position of the element (on which the trigger is defined):
Example
When the user clicks the button (click target), scroll the main scrolling element to position of the element (on which the trigger is defined) +10px down:
Example
When the user clicks the button (click target), scroll the main scrolling element to position of the element (on which the trigger is defined) plus 10px down and 50px left, with a duration of 200ms:
Example
When the user clicks the button (click target), scroll the closest parent element with class
scrollableto the position of the element (on which the trigger is defined):Example
As above, but using
data-lisn-refattribute instead of class selector.