案例:jquery Mobile案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<link rel="stylesheet" href="/js/jquery.mobile-1.3.2.min.css">
5
<script src="/js/jquery-1.8.3.min.js"></script>
6
<script src="/js/jquery.mobile-1.3.2.min.js"></script>
7
<script>
8
$(document).on("pageinit","#pageone",function(){
9
  $("p").on("swipe",function(){
10
    $("span").text("Swipe detected!");
11
  });                       
12
});
13
</script>
14
</head>
15
<body>
16
17
<div data-role="page" id="pageone">
18
  <div data-role="header">
19
    <h1>swipe 事件</h1>
20
  </div>
21
22
  <div data-role="content">
23
    <p>在下面的文本或方框上滑动。</p>
24
    <p style="border:1px solid black;height:200px;width:200px;"></p>

 运行结果 
 北美留学生论坛