forked from openhybrid/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopUI.html
More file actions
37 lines (26 loc) · 1.01 KB
/
topUI.html
File metadata and controls
37 lines (26 loc) · 1.01 KB
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
<!DOCTYPE html>
<html>
<!-- This code is only meant for previewing your Reflow design. -->
<head>
<link rel="stylesheet" href="page.css">
<meta charset="utf-8">
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0">
</head>
<body background="black">
<div id="primaryContainer" class="primaryContainer clearfix">
<div id="box" class="clearfix" onmtouchstart="document.getElementById('box').style.backgroundColor='green' " ontouchend="document.getElementById('box').style.backgroundColor='red'">
</div>
</div>
<script>
var el = document.getElementById("box");
el.addEventListener("touchstart", yourFunction, false);
function yourFunction(){
document.getElementById('box').style.backgroundColor='green'
}
el.addEventListener("touchend", yourFunction2, false);
function yourFunction2(){
document.getElementById('box').style.backgroundColor='red'
}
</script>
</body>
</html>