2012-05-31 16:30:54 -04:00
|
|
|
function initGraphNav() {
|
2012-06-22 16:29:31 -04:00
|
|
|
$(".graph svg").css("position", "relative");
|
|
|
|
$("body").bind("keyup", function(e) {
|
2012-05-31 16:30:54 -04:00
|
|
|
if(e.keyCode == 37) { // left
|
|
|
|
$(".graph svg").animate({ left: "+=400" });
|
|
|
|
} else if(e.keyCode == 39) { // right
|
|
|
|
$(".graph svg").animate({ left: "-=400" });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|