Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Mobile scrollstop event

jQuery Mobile scrollstop event

jQuery Mobile Events jQuery Mobile Events

Example

Pop up a message when page scrolling stops:

$(document).on("scrollstop",function(){

  alert("Stop scrolling!");

});

Try it »


Definition and Usage

scrollstop is an event triggered when page scrolling stops.

Tip: This event is usually attached to the document.

Tip: scrollstartis an event triggered when a page starts scrolling.


Syntax

$("

selector

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

Parameters Description
function(event) Required. Specifies the function to execute when the scrollstop event is triggered.
 该函数有可选的事件对象 ,事件对象可以是任何 jQuery 事件属性 (例如 event.target, event.type, 等)。更多信息请查阅 [jQuery 事件参考手册](/jquery/jquery-ref-events.html) 。 |


More examples

Scroll stop count
Count the number of times the scrollstop event is triggered.

Event Object
Use the event.target property to return the DOM element that triggered the scrollstop event.<


jQuery Mobile Events jQuery Mobile Events