-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (39 loc) · 1.13 KB
/
Copy pathindex.php
File metadata and controls
42 lines (39 loc) · 1.13 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
<html>
<head>
<title>Google Spreadsheet</title>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$.getJSON
(
"http://cors.io/spreadsheets.google.com/feeds/list/0AlTA82kYllmudHNpSVRKRF9fTjBhR2dEU3ZBQ21sb0E/od6/public/values?alt=json",
function(data)
{
var element = $("div#content");
if(data.feed.entry.length > 0)
{
element.empty();
data.feed.entry.forEach(function(book){
element.append("<blockquote><p>"+book['gsx$title']['$t']+"</p><small>"+book['gsx$author']['$t']+"</small></blockquote>");
});
}
else
{
element.html("<div class='alert alert-warning'>No Books available!</div>");
}
}
);
});
</script>
</head>
<body>
<div class='container'>
<h1>List of Books</h1>
<div id='content' class='row'>
</div>
</div>
</body>
</html>