rewrite graph.js in coffeescript

This commit is contained in:
Nihad Abbasov 2012-09-06 04:32:31 -07:00
parent 60e18e2636
commit 08d9421dd9
2 changed files with 10 additions and 10 deletions

View file

@ -0,0 +1,10 @@
initGraphNav = ->
$('.graph svg').css 'position', 'relative'
$('body').bind 'keyup', (e) ->
if e.keyCode is 37 # left
$('.graph svg').animate left: '+=400'
else if e.keyCode is 39 # right
$('.graph svg').animate left: '-=400'
window.initGraphNav = initGraphNav