I am trying to get spam jammer js events, but can't get it to respond to events. I have already tried the following.
http://cijug.net/tech/2013/01/16/backbone-hammer/
https://gist.github.com/kjantzer/4279025
I also put below code snippet in my opinion
initialize: function(){ this.events = _.extend({}, this.defaultEvents, this.events||{}); }
JS Fiddle: http://jsfiddle.net/XcYhD/
the code
<div id="swiping"></div> JS AppView = Backbone.View.extend({ el: '#swiping', events: { 'swipe': 'swipeMe' }, render: function(){ this.$el.html('<h2>Swipe Me</h2>'); }, swipeMe: function(e){ alert('swiped ' + e.direction); } }); var view = new AppView(); view.render();
Libraries included - hammer.js, jquery.specialevent.hammer.js, etc.
Anyway, to make it work?
source share