2 function updateHelloWorldData() {
3 var html = "<table class='table table-bordered table-striped'>";
4 for (var slicekey in xos.slices.models) {
5 slice = xos.slices.models[slicekey]
6 html = html + "<tr><td>" + slice.get("name") + "</td><td>" + slice.get("description") + "</td></tr>";
8 html = html + "</table>";
9 $('#dynamicTableOfInterestingThings').html(html);
12 $(document).ready(function(){
13 xos.slices.on("change", function() { updateHelloWorldData(); });
14 xos.slices.on("remove", function() { updateHelloWorldData(); });
15 xos.slices.on("sort", function() { updateHelloWorldData(); });
17 xos.slices.startPolling();
21 $(document).ready(function() {
22 $('#submitNewDescription').bind('click', function() {
23 newDescription = $("#newDescription").val();
24 xos.slices.models[0].set("description", newDescription);
25 xos.slices.models[0].save();