实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.2/jquery.mobile.min.css">
5
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
6
<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.2/jquery.mobile.min.js"></script>
7
<script>
8
$(document).on("pageinit","#pageone",function(){
9
  $(document).on("scrollstop",function(){
10
    alert("Stopped scrolling!");
11
  });                       
12
});
13
</script>
14
</head>
15
<body>
16
17
<div data-role="page" id="pageone">
18
  <div data-role="header">
19
    <h1>The scrollstop Event</h1>
20
  </div>
21
22
  <div data-role="content">
23
    <p><b>Tip:</b> Try to to resize the window if the scrollbar is not available.</p>
24
  
25
    <p>Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..Some text to enable scrolling..</p>
26
  </div>
27
28
  <div data-role="footer">
29
    <h1>Footer Text</h1>
30
  </div>
31
</div> 
32
33
</body>
34
</html>