jquery.event.swipe.js

 

jQuery.event.move

jQuery.event.swipe

 

<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery.event.swipe</title>
<style type="text/css">
    #cont{ width:100%; height:500px; background:#F90; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script>
<script src="http://stephband.info/jquery.event.move/js/jquery.event.move.js"></script>
<script src="js/jquery.event.swipe.js"></script>
<script type="text/javascript">
$(function(){
    var cont=$("#cont");
    cont.on('swipeleft', function(e) {
        alert("我是swipeleft");
        });
    cont.on('swiperight', function(e) {
        alert("我是swiperight");
        });
    cont.on('swipeup', function(e) {
        alert("我是swipeup");
        });
    cont.on('swipedown', function(e) {
        alert("我是swipedown");
        });
});
</script>
</head>

<body>
<div id="cont">

</div>
</body>
</html>

 

posted @ 2014-08-20 10:33  linyongqin  阅读(1331)  评论(0编辑  收藏  举报