Martillo JS no funciona con espina dorsal
Estoy tratando de obtener los eventos de hammer js trabajando con la red troncal, pero no puedo hacer que responda a los eventos. Ya he intentado lo siguiente ...
http://cijug.net/tech/2013/01/16/backbone-hammer/
https://gist.github.com/kjantzer/4279025
También he puesto debajo de pieza de código en mi vista
initialize: function(){
this.events = _.extend({}, this.defaultEvents, this.events||{});
}
JS Fiddle:http://jsfiddle.net/XcYhD/
Código
<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();
Incluye bibliotecas: hammer.js, jquery.specialevent.hammer.js, etc.
De todos modos para que funcione?