forked from lhagan/jquery.ios-shake
-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
executable file
·46 lines (36 loc) · 1.33 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>Shake - jQuery Shake plugin</title>
</head>
<body>
<div id="content">
<h1>iOS Shake</h1>
<div id="supported">
</div>
<div id="output">
</div>
<div id="debug">
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.ios-shake.js"></script>
<script type="text/javascript">
$(document).ready(function() {
function onShake(shakecount) {
$('#output').html('shakecount: <strong>'+ shakecount +'<strong> <br/>');
}
$.shake({
debug: "#debug",
supported: "#supported",
callback: function(shakecount) { onShake(shakecount); }
});
});
</script>
</body>
</html>