分類  >  Web前端 >

jquery > 監聽手勢上下滑動 hammer

tags:    時間:2013-12-09 23:34:40
jquery > 監聽手勢左右滑動 hammer
<!DOCTYPE html> <html lang="en"> <head>     <meta charset="utf-8">     <title> New Document </title>     <link rel="stylesheet" href="" type="text/css" />     <script type="text/javascript" src="http://code.jquery.com/jquery-2.0.2.js"></script> 	<script type="text/javascript" src="./jquery.hammer.js"></script>   <script language="javascript"> <!--   	$(document).ready(function(){  		Hammer($("#weee")).on("swipeleft", function(event) { 			$("#weee").html($("#weee").html()+'left'); 		}); 		Hammer($("#weee")).on("swiperight", function(event) { 			$("#weee").html($("#weee").html()+'right'); 		});              	}); //--> </script> </head> <body>  <div style="width:600px;height:300px;border:2px solid red" id="weee"> </div>  </body> </html>

 

 

 

 

推薦閱讀文章

Bookmark the permalink ,來源:互聯網