-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogic.js
More file actions
28 lines (21 loc) · 859 Bytes
/
logic.js
File metadata and controls
28 lines (21 loc) · 859 Bytes
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
$("#factButton").on("click", function() {
var number = Math.floor((Math.random() * booFacts.length));
$("#factText").text(booFacts[number])
})
var booFacts = ["Boo is a pomeranian", "Boo's best friend is another pomeranian named Buddy", "Boo the Pomeranian was born on March 16", "making him a Pisces", "Boo's favourite food is grass", "Boo has released two books"]
$("#textPink").on("click", function() {
$("#funText").css("color", "pink")
})
$("#textOrange").on("click", function() {
$("#funText").css("color", "orange")
})
$("#textGreen").on("click", function() {
$("#funText").css("color", "green")
})
$("#boxGrow").on("click", function() {
$("#box").animate({height:"+=35px",
width:"+=35px"}, "fast");
})
$("#boxShrink").on("click", function() {
$("#box").animate({height:"-=35px", width:"-=35px"}, "fast");
})