Function: getScrollLeft()
ts
function getScrollLeft(element): number;Get the horizontal scroll position.
Parameters
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement | Window | Scroll container element or window object. |
Returns
number
The horizontal scroll position.
Example
ts
console.log(getScrollLeft(window))Since
1.0.0