var IntroView = View.extend({ el: "#intro", events: { }, initialize: function(){ this.logo = this.$("#logo").get(0) window.addEventListener("deviceorientation", deviceorientation) }, deviceorientation: function(e){ var heading if ('webkitCompassHeading' in e) { heading = e.webkitCompassHeading } else { heading = e.alpha } this.logo.css[transformProp] = "translateZ(0) rotate(" + heading + "deg)" }, })