Latest web development tutorials

jQuery Mobile scrollstart event

jQuery Mobile Events jQuery Mobile Events

Examples

Page scrolling pop-up message when you begin:

$(document).on("scrollstart",function(){
alert("开始滚动!");
});

try it"

Definition and Usage

scrollstart event is triggered when the page starts scrolling.

Note: Apple devices freeze DOM action when scrolling, when scrolling the end of the queue by performing these operations dom, we are now working on ways to make the Apple device to perform dom action before scrolling begins.

Note: This event is often attached to the document.

Tip: scrollstop event is triggered when scrolling over.


grammar

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

参数 描述
function(event) 必须。指定 scrollstart 事件触发时执行的函数。

该函数有可选的事件对象 ,事件对象可以是任何 jQuery 事件属性 (例如 event.target, event.type, 等)。更多信息请查阅 jQuery 事件参考手册


Examples

More examples

The number of rolling statistics
Number scrollstart event trigger calculations.

Event objects
Use event.target property to return the DOM element scrollstart event trigger.


jQuery Mobile Events jQuery Mobile Events