Latest web development tutorials

jQuery Mobile scrollstop 事件

jQuery Mobile 事件 jQuery Mobile事件

實例

頁面滾動停止時彈出信息:

$(document).on("scrollstop",function(){
alert("停止滚动!");
});

嘗試一下»

定義和用法

scrollstop是頁面滾動停止時觸發的事件。

提示:此事件通常附加到文檔。

提示: scrollstart是頁面開始滾動時觸發的事件。


語法

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

參數 描述
function(event) 必須。 指定scrollstop 事件觸發時執行的函數。

該函數有可選的事件對象 ,事件對象可以是任何jQuery 事件屬性(例如event.target, event.type, 等)。 更多信息請查閱jQuery事件參考手冊


實例

更多實例

滾動停止計數
計算scrollstop 事件觸發的次數。

事件對象
使用event.target 屬性返回scrollstop 事件觸發的DOM元素。 <


jQuery Mobile 事件 jQuery Mobile事件