-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.js
29 lines (28 loc) · 892 Bytes
/
event.js
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
$(window).mousedown(function(e){
socket.emit('my other event', { my: '1' });
soundBackground.currentTime=0;
soundBackground.play();
soundBackground.currentTime=0;
isAnimate1=1;
});
$(window).mouseup(function(e){
socket.emit('my other event', { my: '0' });
soundBackground.pause();
isAnimate1=0;
});
document.addEventListener('touchstart', function(event) {
socket.emit('my other event', { my: '1' });
// soundBackground.currentTime=0;
soundBackground.play();
// soundBackground.currentTime=0;
isAnimate1=1;
}, false);
document.addEventListener('touchend', function(event) {
socket.emit('my other event', { my: '0' });
soundBackground.pause();
isAnimate1=0;
}, false);
$(window).unbind("touchstart");
/*
$(document).bind("touchstart",function(e){
});*/