-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
55 lines (50 loc) · 1.31 KB
/
script.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
var speedButton = $('.speedButton');
speedButton.on("click", toHome);
document.getElementById('bar').addEventListener("click", function(toHome);
function toHome(event) {
event.preventDefault();
var name = prompt(document.getElementById("name").value);
location.assign("welcome.html");
window.location.href = "welcome.html";
// var name = $('.inputBox').val();
console.log(name);
};
var i = 15;
(function timer(){
if (--i < 0) return;
setTimeout(function(){
document.getElementsByTagName('h1')[0].innerHTML = i + ' secs';
timer();
}, 1000);
if (i === 0) {
window.location.href = "welcome.html";
}
})();
var item = $('.item');
item.on("hover", mouseOver);
function mouseOver() {
item.toggleClass('itemDetails');
item.style.color = "red";
};
// $(
function(){
var aud = $('audio')[0];
$('.play-pause').on('click', function(){
if (aud.paused) {
aud.play();
$('.play-pause').removeClass('icon-play');
$('.play-pause').addClass('icon-stop');
}
else {
aud.pause();
$('.play-pause').removeClass('icon-stop');
$('.play-pause').addClass('icon-play');
}
})
$('.next').on('click', function(){
aud.src = 'velvetlight.mp3';
})
aud.ontimeupdate = function(){
$('.progress').css('width', aud.currentTime / aud.duration * 100 + '%')
}
// })