Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (27 sloc) 958 Bytes
<!doctype html>
<meta charset="utf-8">
<title>Touch Events</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" href="../include/style.css">
Example from <a href=""><em>Foundation HTML5 Animation with JavaScript</em></a>
<canvas id="canvas" width="400" height="400"></canvas>
<aside>Open debugging console in web browser of touch-capable device.</aside>
window.onload = function () {
var canvas = document.getElementById('canvas');
function onTouchEvent (event) {
canvas.addEventListener('touchstart', onTouchEvent, false);
canvas.addEventListener('touchend', onTouchEvent, false);
canvas.addEventListener('touchmove', onTouchEvent, false);