graph.js 304 Bytes
Newer Older
randx's avatar
randx committed
1
function initGraphNav() { 
randx's avatar
randx committed
2 3
  $(".graph svg").css("position", "relative");
  $("body").bind("keyup", function(e) {
randx's avatar
randx committed
4 5 6 7 8 9 10
    if(e.keyCode == 37) { // left
      $(".graph svg").animate({ left: "+=400" });
    } else if(e.keyCode == 39) { // right
      $(".graph svg").animate({ left: "-=400" });
    }
  });
}