-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (48 loc) · 1.46 KB
/
index.html
File metadata and controls
69 lines (48 loc) · 1.46 KB
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
<!DOCTYPE html>
<html>
<head>
<title>no-sucky-socks</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
</head>
<body>
<h1>
<p>No sucky socks!</p>
</h1>
<table id="employees">
<tr><td>Laddar</td></tr>
</table>
<h2>
<p>Dagens no sucky socks</p>
</h2>
<div class="instafeed-container">
<div id="instafeed">
</div>
</div>
<script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="instafeed.js"></script>
<script type="text/javascript">
var noSuckySocksFirebaseRef = new Firebase('https://no-sucky-socks.firebaseio.com');
var feed = new Instafeed({
get: 'tagged',
tagName: 'nosuckysocks',
clientId: '0ac89918cdbf4e51906c0b33013803c7',
limit: 6
});
feed.run();
noSuckySocksFirebaseRef.child("employees").on("value", function(snapshot) {
var employees = snapshot.val(); // Alerts "San Francisco"
var $employeesEl = $('#employees');
var html = '';
employees.sort(function(a, b) {
return a.score < b.score;
})
html = employees.map(function(employee) {
return '<tr><td>' + employee.name + '</td><td> ' + employee.score + ' </td></tr>'
});
$employeesEl.html(html);
});
</script>
</body>
</html>