jQuery Mobile Scrolling Events
- Previous Page jQuery Mobile Touch
- Next Page jQuery Mobile Direction
jQuery Mobile provides two scrolling events: one for when scrolling begins and another for when scrolling ends.
jQuery Mobile Scrollstart
The scrollstart event is triggered when the user starts scrolling the page:
Example
$(document).on("scrollstart",function(){
alert("Scrolling started!");
});
Note:iOS devices freeze DOM operations when a scrolling event occurs, which means that nothing can be changed when the user scrolls. However, the jQuery team is working hard to solve this problem.
jQuery Mobile Scrollstop
The scrollstop event is triggered when the user stops scrolling the page:
Example
$(document).on("scrollstop",function(){
alert("Scroll ended!");
});
- Previous Page jQuery Mobile Touch
- Next Page jQuery Mobile Direction