scrollend is a new javascript events just like any other event (click,scroll etc).
Table of Contents |
---|
when is it fired? |
DEMO |
Syntax |
Is it supported by all browsers? |
Documentation |
Your Views |
when is it fired?
the scrollend
event is same as the other events, and the syntax is same as other events.
The scrollend
event fires when element scrolling has completed. Scrolling is considered completed when the scroll position has no more pending updates and the user has completed their gesture. or in other words
when the scroll event ends
Demo Video
I could have embed code-pen but the event is not supported by many bowsers
Syntax
element.addEventListener("scrollend", (event) => {
output.innerHTML = "Scrollend event fired!";
});
OR
element.onscrollend = (event) => {
output.innerHTML = "Element scrollend event fired!";
};
Browser compatibility
- its a new event so only few Browsers supports this event.
Browser | support | version |
---|---|---|
Chrome | canary |
dev |
Firefox | yes |
109 |
Edge | No | -- |
Safari | No | -- |
Opera | No | -- |
Top comments (2)
one of many uses
Safari - as always