jQuery Mobile滚动事件

当用户在设备上滚动页面时,jQuery Mobile提供了滚动事件进行监听。其中首先介绍的是scrollstart事件,该事件发生在页面滚动开始时,如下代码:

 $(document).ready(function(){

  $('body').bind('scrollstart', function(event) {

  //相关的滚动开始代码

  });

  });

同样,当滚动停止后,则可以用scrollstop事件进行监听,如下代码:

 $(document).ready(function(){

  $('body').bind('scrollstop', function(event) {

  //相关滚动停止的代码

  });

  });
posted @ 2015-01-20 15:20  dekevin  阅读(438)  评论(0编辑  收藏  举报