-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapple.js
70 lines (60 loc) · 1.81 KB
/
apple.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
$(document).ready(function () {
$("#showDice").click(function () {
$("#diceRoller").animate({
height: 'toggle'
});
});
var dieNum;
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function rollDie(num) {
num = num.substring(1, num.length);
$(".die").html(getRandomInt(1, num));
}
$(".roll").on("click", function () {
dieNum = $(this).html();
rollDie(dieNum);
});
//show login overlay
$("#loginButton").click(function () {
$("#login").css("height", "55%");
});
//hide the overlay
$("#hideLogin").click(function () {
$("#login").css("height", "0%");
return (false)
});
//show register overlay
$("#registerButton").click(function () {
$("#register").css("height", "55%");
});
//hide the overlay
$("#hideRegister").click(function () {
$("#register").css("height", "0%");
return (false)
});
function bigText($param) {
$param.animate({fontSize: '1.5em'}, "slow");
}
$("#secretButton").click(function () {
$("#secret").css("height", "100%");
$("#half").delay(300).animate({width: 1745}, 1000);
$("#skel").delay(2000).animate({left: 1900}, 3500);
$("#spook").delay(5000).animate({
height: "toggle"
}, 5000);
});
//hide the overlay
$("#hideSecret").click(function () {
$("#secret").css("height", "0%");
$("#half").animate({width: 0}, 200);
$("#skel").delay.animate({left: -50}, 3500);
$("#spook").animate({
height: "toggle"
}, 500);
return (false)
});
$("#sword").delay(1000).animate({top: "30%"});
$("#sword2").delay(1000).animate({top: "30%"});
});