Permalink
Browse files

add loading info

  • Loading branch information...
alx committed Jul 16, 2011
1 parent 72c8830 commit 80ff0e897a5f600158a4a5ec85da6edcade56c7b
Showing with 7 additions and 3 deletions.
  1. +7 −3 json_server/public/js/script.js
@@ -4,12 +4,16 @@
var heatmap;
-$(document).ready(function(){
- heatmap = h337.create({"element":document.getElementById("heatmapArea"), "radius":8, "visible":true});
-
+function refreshHeatmap(){
+ $("#heatmapArea").prepend("<span id='heatmap_loading'>chargement...</span>")
$.getJSON("/heatmap", function(data){
heatmap.store.setDataSet(data);
+ $("#heatmap_loading").remove();
});
+}
+$(document).ready(function(){
+ heatmap = h337.create({"element":document.getElementById("heatmapArea"), "radius":8, "visible":true});
+ refreshHeatmap();
});

0 comments on commit 80ff0e8

Please sign in to comment.