1 $(document).ready(function()
4 $.ajax({url : "/sensor", data : {}}).done(function(data) {$(this).update(data)});
6 // Interpret AJAX response
7 $.fn.update = function(data)
9 console.log("Interpret AJAX response: "+data);
10 $("#body").html("<a href=\"/index.html\">"+data+"</a>")