Latest web development tutorials
 

jQuery Mobile Scroll Events


jQuery Mobile provides two scroll events: when scrolling starts and when scrolling stops.


jQuery Mobile Scrollstart

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

Example

$(document).on("scrollstart",function(){
  alert("Started scrolling!");
});
Try it Yourself »

Note: iOS devices freeze DOM manipulation during scrolls, which means that it is not possible to change something when the user scrolls. However, the jQuery team are working on a solution for this.


jQuery Mobile Scrollstop

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

Example

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