var NavView = View.extend({ el: "body", events: { "click .prev": "prev", "click .next": "next", "click .link": "link", // "touchstart .prev": "prev", // "touchstart .next": "next", // "touchstart .link": "link", "click .refresh": "refresh", "click .random": "random", }, initialize: function(){ this.id = -1 this.$pip = this.$("#pip") this.$pip_img = this.$("#pip img") this.$image = this.$("#image") $(window).on("keydown", this.keydown.bind(this)) $(document).ajaxError(function(){ this.fetching = false }.bind(this)) window.onpopstate = function(event) { this.display(event.state) }.bind(this) if (window.location.pathname.indexOf("/p/") !== -1) { var id = window.location.pathname.split("/")[2] this.fetch(id) } else { this.latest() } $(".prev").on("touchstart", function(){ console.log("<<<<