as the title description,i write html codes which applies on mobile platform,then i test codes through google chrome which can emulate mobile phone to access the web pages.the codes as follows.
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
* {
padding: 0px;
margin: 0px;
}
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
}
body{
background: palegreen;
}
</style>
</head>
<body>
<script src="js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/touch.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$("body").swipeUp(function() {
alert("hello swipeUp");
})
$("body").swipeDown(function() {
alert("hello swipeDown");
})
$("body").tap(function() {
alert("hello tap");
})
</script>
</body>
at last,i find "swipeUp" or "swipeDown" is not valid in google chrome and “tap” will be triggered twice.please help me,thanks.
Firstly, do not hesitate to write how you tested the problem, because you told that it did not work in Google Chrome, but you not wrote in which browsers it didn´t work. The better you describe your problem, the better answer you can obtain. Could you please describe more informations about your problem?
Are you assured that "js/zepto.min.js" is available?
(maybe it is not best idea, but about this you can play more with JS and scroll events)