X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery scrollstop Event

jQuery Mobile Events jQuery Mobile Events

Example

Alert some text when a user stops to scroll the page:

$(document).on("scrollstop",function(){
  alert("Stopped scrolling!");
});

Try it yourself »

Definition and Usage

The scrollstop event is triggered when the user stops to scroll the page.

Tip: This event is often attached to the document.

Tip: The scrollstart event is triggered when the user starts to scroll the page.


Syntax

$("selector").on("scrollstop",function(event){...})

Parameter Description
function(event) Required. Specifies the function to run when the scrollstop event occurs

The function has an optional event object, which can contain any jQuery event properties (e.g. event.target, event.type, etc.) See jQuery Events Reference for more information.


Examples

Try it Yourself - Examples

Count scroll stops
Count the number of times the scrollstop event occurs.

The event object
Using the event.target property to return which DOM element that triggered the scrollstop event.


jQuery Mobile Events jQuery Mobile Events


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook