jquery.event.swipe.js

阎裕
2023-12-01

 

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>

 

转载于:https://www.cnblogs.com/linyongqin/articles/3923994.html

 类似资料:

相关阅读

相关文章

相关问答