forked from quickredfox/jquery-jsonview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
37 lines (34 loc) · 1.25 KB
/
example.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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>example</title>
<link rel="stylesheet" href="css/jquery.jsonview.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style type="text/css" media="screen">
body{background:#f5f9f5;}
#jsonview{
display:block;position:absolute;top:5%;left:50%;width:800px;margin-left:-406px;border:3px solid #787;overflow:auto;
-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;padding:10px;bottom:10%;
-moz-box-shadow:3px 3px 6px #ccc;-webkit-box-shadow:3px 3px 6px #ccc;box-shadow:3px 3px 6px #ccc;
background:#fff;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.jsonview.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
// wait for document ready
$(function(){
// load some json data
$.getJSON('data.json',function(json){
// inject contents in document body
$('#jsonview').jsonView(json);
})
});
</script>
</head>
<body>
<div id="jsonview">
</div>
</body>
</html>