convert scroll swipe method from JS to Coffeescript