-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcountdown.html
More file actions
96 lines (91 loc) · 2.71 KB
/
countdown.html
File metadata and controls
96 lines (91 loc) · 2.71 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MockStock</title>
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-32x32.png">
<script src="js/jquery-3.1.1.min.js"></script>
<style>
body {
text-align: center;
background: #F5F5F5;
font-family: sans-serif;
font-weight: 100;
}
h1 {
color: #263238;
font-weight: 100;
font-size: 40px;
margin: 40px 0px 20px;
}
#clockdiv {
font-family: sans-serif;
color: #fff;
display: inline-block;
font-weight: 100;
text-align: center;
font-size: 30px;
}
#clockdiv > div {
padding: 10px;
border-radius: 3px;
background: #F5F5F5;
display: inline-block;
}
#clockdiv div > span {
padding: 15px;
border-radius: 3px;
background: #263238;
display: inline-block;
}
.smalltext {
padding-top: 5px;`
font-size: 16px;
color: #263238;
}
</style>
<script>
$(document).ready(function () {
var countDownDate = new Date("Apr 2, 2018 11:00:00").getTime();
var x = setInterval(function () {
var now = new Date().getTime();
var distance = countDownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
$("#d").text(days);
$("#h").text(hours);
$("#m").text(minutes);
$("#s").text(seconds);
if (distance < 0) {
clearInterval(x);
alert("Market has been started");
location.replace("index.html")
}
}, 1000);
})
</script>
</head>
<body>
<h1 style="margin-top: 200px">Market will start in</h1>
<div id="clockdiv">
<div>
<span class="days" id="d"></span>
<div class="smalltext">Days</div>
</div>
<div>
<span class="hours" id="h"></span>
<div class="smalltext">Hours</div>
</div>
<div>
<span class="minutes" id="m"></span>
<div class="smalltext">Minutes</div>
</div>
<div>
<span class="seconds" id="s"></span>
<div class="smalltext">Seconds</div>
</div>
</div>
</body>
</html>