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 事件