forked from jquery/jquery-ui
/
grid-plain.html
48 lines (44 loc) · 1.18 KB
/
grid-plain.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grid: Featureless</title>
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="../demos/demos.css">
<script src="../jquery-1.6.2.js"></script>
<script src="../external/jsrender.js"></script>
<script src="../ui/jquery.ui.core.js"></script>
<script src="../ui/jquery.ui.widget.js"></script>
<script src="../ui/jquery.ui.button.js"></script>
<script src="../ui/jquery.ui.grid.js"></script>
<script>
$(function() {
// TODO add another one with local data?
$.getJSON("developers.json", function( localDevelopers ) {
$( "#developers-ajax" ).grid({
source: localDevelopers
})
// TODO should this happen automatically? need to research how that affects other grids
.grid("refresh");
});
});
</script>
</head>
<body>
<h1>Grids with just an array as input</h1>
<p>features: featureless</p>
<div style="width:40em;">
<table id="developers-ajax">
<thead>
<tr>
<th data-property="firstName">First Name</th>
<th data-property="lastName">Last Name</th>
<th data-property="country">Country</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</body>
</html>