Hammer.js events with Marionette.js doesn't work

224 views Asked by At

I'm trying to use Hammer.js with Backbone , Marionette and Require.js

When i initialize events , the event is not fired .

I use Hammer.js and jQuery.hammer extension

I would like to do something like that :

edit :

events: {
    "tap .menu ": " handleTap "
},

handleTape: function(){
    console.log("Hammer time!");
},

onRender: function () {
    // Instantiate Hammer
    $ This el.hammer().
}

To reach this goal , i include Hammer.js first , then jquery.hammer before Backbone and Marionette.js. There is no error in debug console, just my event is not detected

There is way to bind hammer's events without doing something like :

onRender: function () {
    // Instantiate Hammer and bind tap event
    this.$el.hammer().bind('tap .menu', function () {
        console.log('Hammer Time!'
        }).
    }
0

There are 0 answers