detect_guester
Version:
this is detect user guester plugin
49 lines (45 loc) • 1.35 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>偵測使用者操錯</title>
</head>
<body>
<div id="test" style="height:300px;color:white;background:gray">
測試
</div>
</body>
<script type="text/javascript" src="../src/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../src/detect_guester.js"></script>
<script type="text/javascript">
detectGuester.swipe({
target:'#test',
direction:'top',
callback: function() {
alert('swipe top')
}
});
// detectGuester.press({
// target:'#test'
// })
// detectGuester.longPress({
// target: '#test',
// callback:function(){
// alert('long press')
// }
// })
// detectGuester.rotate({
// target:'#test',
// callback:function() {
// alert('callback trigger')
// }
// })
// detectGuester.zoom({
// target:'#test',
// direction:'out',
// callback:function() {
// alert('callback trigger')
// }
// })
</script>
</html>