-
Notifications
You must be signed in to change notification settings - Fork 0
/
PersonalScript.js
46 lines (46 loc) · 1.08 KB
/
PersonalScript.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
var awesome = true;
var myFirebaseRef = new Firebase("https://html-site.firebaseio.com/");
console.log(myFirebaseRef);
function myFunction() {
console.log("IT IS IN THE FUNCTION");
var x = document.getElementById("Rainbow");
x.style.fontSize = "90pt";
if(awesome == true) {
console.log("IN THE IF STATEMENT");
x.style.color = "red";
x.innerHTML = "RAINBOW RISING"
awesome = false;
console.log("is Running");
myFirebaseRef.set({
title: "Hello World!",
author: "Firebase",
location: {
city: "San Francisco",
state: "California",
zip: 94103
}
});
console.log("it ran");
}
else {
x.style.color = "#974700";
x.innerHTML = "Kyle Ohanian"
awesome = true;
}
}
$(document .ready(function(){
$("button").click(function(){
if(awesome == true) {
$("h1").css("color","red");
$("h1").html("Rainbow Rising!!!!");
$("a").css("color","red");
awesome = false;
}
else {
$("h1").css("color","#974700");
$("a").css("color","#974700");
$("h1").html("Kylito Ohanman");
awesome = true;
}
});
});