This file contains a functionality to scrolling an HTML element.
Methods
# static scrollToElement(element, durationopt, offsetopt)
Scroll to a DOM element.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
element |
object
|
DOM element |
||
duration |
number
|
<optional> |
300 | Duration of the movement in milliseconds. |
offset |
number
|
<optional> |
0 | Distance to the element to keep. |