-
Notifications
You must be signed in to change notification settings - Fork 0
/
Javascript-project.js
83 lines (71 loc) · 1.95 KB
/
Javascript-project.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
var IDLE_TIMEOUT = 60;
var _idleSecondsCounter = 0;
window.addEventListener('load',init);
function init() {
window.addEventListener('click', function(){
_idleSecondsCounter = 0;
});
window.addEventListener('mousemove', function(){
_idleSecondsCounter = 0;
});
window.addEventListener('keypress', function(){
_idleSecondsCounter = 0;
});
window.setInterval(checkIdleTime, 1000); //milliseconds
}
//function checkIdleTime() {
// _idleSecondsCounter++;
// if (_idleSecondsCounter >= IDLE_TIMEOUT) {
// alert("Time Expired!!!");
// window.clearInterval ();
// window.location.href = "index.html"; // return to home page
// }
//}
//sound when hover
var clicking = $("#clicksound")[0];
$("p").mouseenter(function() {
clicking.play();
});
var clicking = $("#clicksound0")[0];
$("a").mouseenter(function() {
clicking.play();
});
//
// $("#mainnav a")
// .each(function(i) {
// if (i != 0) {
// $("#beep-two")
// .clone()
// .attr("id", "beep-two" + i)
// .appendTo($(this).parent());
// }
// $(this).data("beeper", i);
// })
// .mouseenter(function() {
// $("#beep-two" + $(this).data("beeper"))[0].play();
// });
//$("#beep-two").attr("id", "beep-two0");
//function init(){
//var signup = document.getElementById("sign");
//signup.addEventListener("click", boxShow);
//}
//
//function boxShow1(){
// document.getElementById("sign_inform").style.display = "block";
//}
//function boxShow2(){
// document.getElementById("sign_upform").style.display = "block";
//}
//function boxShow3(){
// document.getElementById("edit_form").style.display = "block";
//}
//function boxRemove1(){
// document.getElementById("sign_inform").style.display = "none";
//}
//function boxRemove2(){
// document.getElementById("sign_upform").style.display = "none";
//}
//function boxRemove3(){
// document.getElementById("edit_form").style.display = "none";
//}
//