-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
80 lines (78 loc) · 3.57 KB
/
index.html
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
<!DOCTYPE html>
<html>
<title>
Chalkboard Love
</title>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Dosis:400,700' rel='stylesheet' type='text/css'>
<link rel='stylesheet' type="text/css" href="css/desktop.css">
<script src='https://cdn.firebase.com/js/client/1.0.11/firebase.js'></script>
</head>
<body>
<div id="Beginning">use the up and down arrows or scroll to move</div>
<div id="Background">
<div id="BackgroundBuildings" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Banner1" class="SizeCoverPosition"></div>
<div class="ScrollSpeed1 SizeCoverPosition" id="Banner2"></div>
<div class="ScrollSpeed1 SizeCoverPosition" id="Banner3"></div>
<div id="Grass1" class="background-elements SizeCoverPosition"></div>
<div id="Grass2" class="background-elements SizeCoverPosition"></div>
<div id="Cloud1" class="background-elements SizeCoverPosition"></div>
<div id="Cloud2" class="background-elements SizeCoverPosition"></div>
<div id="People1" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="People2" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Quote1" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Quote2" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Quote3" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Dillo1" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Dillo2" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Dillo3" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Speaker1" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
<div id="Speaker2" class="background-elements ScrollSpeed1 SizeCoverPosition"></div>
</div>
<div id="Phil">
<div id="PhilSlides"></div>
</div>
<div id="MessageBoard">
<div id="MessageBox">
<h1>Why do you love Northwestern?</h1>
<div id ="Message-BoxScroll">
<div id="Messages">
</div>
<div id="input">
<table id ="TableHide"><tr width="90%">
<td width="400px">
<input id="userReason" type="text" name = "reason" placeholder="I love NU because..." maxlength="45">
</td>
<td width="20px">
<input id="userName" type="text" name ="name" placeholder="Initials">
</td>
</tr>
</table>
<button id = "ButtonHide">Submit</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/main.js"></script>
<script>
var myDataRef = new Firebase('https://glaring-fire-2450.firebaseio.com/');
$('#ButtonHide').on("click",function() {
var name = $('#userName').val();
var text = $('#userReason').val();
myDataRef.push({name: name, text: text});
$('#userReason').val('');
$('#userName').val('');
});
myDataRef.limit(9).on('child_added',function(snapshot){
var message = snapshot.val();
displayChatMessage(message.name, message.text);
})
function displayChatMessage(name, text) {
$("#Messages").append("<p>\"" + text + "\" -" + name + "</p>");
$('#Messages')[0].scrollTop = $('#Messages')[0].scrollHeight;
};
</script>
</body>
</html>