Martelo JS não está funcionando com backbone
Eu estou tentando obter eventos martelo js trabalhando com o backbone, mas não posso obtê-lo para responder a eventos. Eu já tentei o seguinte ..
http://cijug.net/tech/2013/01/16/backbone-hammer/
https://gist.github.com/kjantzer/4279025
Eu também coloquei abaixo parte do código na minha opinião
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();
Bibliotecas Incluídas - hammer.js, jquery.specialevent.hammer.js, etc.
De qualquer forma para fazê-lo funcionar?