a função swiperight não está a funcionar
1
1 answers
Tenta assim 100% a funcionar:
Defina swiperight
e swipeleft
ou use isto:
$(document).on('swipeleft', 'body', function(event){ });
$(document).on('swiperight', 'body', function(event){ });
Exemplo:
$(document).on('swipeleft', 'body', function(event){
alert("swipeleft");
return false;
});
$(document).on('swiperight', 'body', function(event){
alert("swiperight");
return false;
});
<!DOCTYPE html>
<html>
<head>
<title>Swiperight Example</title>
<meta name="viewport" content="width=device-width,height=device-height,minimum-scale=1,maximum-scale=1"/>
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
<p>Try to Swipe Right or Left</p>
</body>
</html>
0
Author: Chandra Kumar, 2017-08-04 04:44:46