jQuery Mobile 滑動換頁

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile 滑動換頁</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

<script>
$(function(){
$("#page1").bind("swipeleft",function(){
$.mobile.changePage("#page2");
});
$("#page2").bind("swiperight",function(){
$.mobile.changePage("#page1");
});
});

</script>

</head>
<body>
<center>
<div data-role="page" id="page1"> <h1>第一頁 往左滑</h1> </div>
<div data-role="page" id="page2"> <h1>第二頁 往右滑</h1> </div>
</center>
</body>
</html>

留言

這個網誌中的熱門文章

歐姆龍 HEM-7600T 評價,購買心得分享(打臉文)

超任 三國志3代,登入武將金手指

年青人眼鏡評價(負評),辛酸血淚史分享文