shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
onScrollEnd
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.on
This function simply listen for scroll on the passed element and call the passed callback when reaching the end of it.
Params
- $elm*-HTMLElement
The element to listen on
- callback*-Function
The function to call when scroll end is detected
- settings{}TOnScrollEndSettings
Some settings like offset, etc…
Example
import { onScrollEnd } from '@blackbyte/sugar/dom';
onScrollEnd($elm, () => {
// do something
}, {
offset: 50
});Settings
- offset20Number
An offset to detect earlier the end of the scroll
- oncefalseboolean
true if you want to detect the scroll end just once
- times-1number
Specify a number of times to detect the scroll end
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space