-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
50 lines (43 loc) · 1.99 KB
/
index.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
$(document).ready(function () {
$('input').keydown(function (e) {
if (e.key === 'Enter') {
$('#js-name').hide();
$('#js-openingMessage').hide();
$('#js-greeting').text('Hello ' + $('#js-name').val());
$('#js-dot1').fadeIn(1000, function () {
$('#js-dot2').fadeIn(1000, function () {
$('#js-dot3').fadeIn(1000, function () {
$('.js-welcomeMessage').fadeIn(5000, function () {
$(".js-welcomeMessage").addClass(
"js-welcomeMessage1"
);
$(".js-welcomeMessage").text(
"Welcome to the black website."
);
$('.js-instructions').fadeIn(1000, function () {
$('.js-instructions').addClass(
'js-instructions1'
)
$(".js-instructions").text(
"The elements of this webpage are hidden in the void. Hover to find them."
);
$('.earth').fadeIn(1000, function () {
$(".earth").addClass('earth1');
$(".earthPosition").addClass('earthPosition1');
});
});
});
});
});
});
}
});
setInterval(timeOfDay, 1000);
function timeOfDay() {
let d = new Date();
document.getElementById('timeOfDay').innerHTML =
d.getHours().toString().padStart(2, '0') + ":" +
d.getMinutes().toString().padStart(2, '0') + ":" +
d.getSeconds().toString().padStart(2, '0');
}
});