mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-03 01:01:41 +00:00
35 lines
946 B
HTML
Executable File
35 lines
946 B
HTML
Executable File
<div data-role="view" data-title="Touch Events">
|
|
|
|
<div
|
|
id="touchSurface"
|
|
data-role="touch"
|
|
data-enable-swipe="1"
|
|
data-touchstart="myTouch.touchstart"
|
|
data-swipe="myTouch.swipe"
|
|
data-tap="myTouch.tap"
|
|
data-doubletap="myTouch.doubletap"
|
|
data-hold="myTouch.hold"
|
|
>
|
|
touch / swipe / double-tap / tap / hold
|
|
</div>
|
|
<div class="console"></div>
|
|
</div>
|
|
<script>
|
|
window.myTouch = {
|
|
touchstart: function(e) { kendoConsole.log("touch start"); },
|
|
swipe: function(e) { kendoConsole.log("swipe " + e.direction); },
|
|
tap: function(e) { kendoConsole.log("tap"); },
|
|
doubletap: function(e) { kendoConsole.log("double tap"); },
|
|
hold: function(e) { kendoConsole.log("hold"); }
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#touchSurface {
|
|
background: #161d2b;
|
|
color: #ffffff;
|
|
padding: 5em 1em;
|
|
text-align: center;
|
|
}
|
|
</style>
|