1. 程式人生 > >DIV塊左右滑動

DIV塊左右滑動

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
<body>


<div data-role="page" id="pageone">
  <div data-role="content">
    <p>點選連結來檢視滑動效果(從右向左滑動到下一頁)</p>
    <a href="#pagetwo" data-transition="slide">滑動到頁面二</a>
  </div>
</div> 
<div data-role="page" id="pagetwo">
  <div data-role="content">
    <p>點選連結來檢視滑動效果(從右向左滑動到下一頁)</p>
    <a href="#pagethree" data-transition="slide">滑動到頁面3</a>
<a href="#pageone" data-transition="slide" data-transition="reverse">滑動到頁面1</a>
  </div>
</div> 
<div data-role="page" id="pagethree">
  <div data-role="content">
    <p>點選連結來檢視反向的滑動效果(從左向右滑動到前一頁)</p>
    <a href="#pageone" data-transition="slide" data-direction="reverse">滑動到頁面一(反向)</a>
  </div>
</div> 


</body>
</html>