-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
96 lines (74 loc) · 1.75 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
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
var refreshIntervalId;
$(document).on("ready", ready);
function ready(){
$(".animate").hide();
$("#steps")[0].play();
setTimeout(function(){frame1()},2000);
}
function frame1()
{
$("#steps")[0].pause();
$("#crash")[0].play();
setTimeout(function(){frame2()},2000);
}
function frame2()
{
$("#sorry").show().typewriter();
setTimeout(function(){frame3()},2000);
}
function frame3()
{
$(".speech").hide();
$("#talking-normal").show();
$("#is-this-valve").show().typewriter();
setTimeout(function(){frame4()},5000);
}
function frame4()
{
$("#is-this-valve-options").show();
idle();
$("#yes-congrats").on("click",yesCongrats1)
refreshIntervalId = setInterval(function(){idle()},10000);
}
function idle(){
i = Math.floor(Math.random()*10)
$(".animate").hide();
if(i < 10){
$("#idle-blink img").attr("src", "gifs/idle/blink.gif")
$("#idle-blink").show();
}else if(i==10){
$("#idle-spying img").attr("src", "gifs/idle/spying.gif")
$("#idle-spying").show();
}
}
function yesCongrats1()
{
clearInterval(refreshIntervalId);
$("#yay")[0].play();
$(".animate").hide();
$("#happy").show();
setTimeout(function(){yesCongrats2()},5000);
}
function yesCongrats2()
{
$(".speech").hide();
$(".animate").hide();
$("#talking-normal").show();
$("#i-came-for-a-job-interview").show().typewriter();
setTimeout(function(){yesCongrats3()},15000);
}
function yesCongrats3()
{
$("#i-came-for-a-job-interview-options").show();
idle();
refreshIntervalId = setInterval(function(){idle()},15000);
$("#of-course").on("click",jobinterviewOptions)
}
function jobinterviewOptions()
{
$(".speech").hide();
$("#curriculum-options").show();
$("#why").on("click",why1);
$("#goal").on("click",goal1);
refreshIntervalId = setInterval(function(){idle()},15000);
}