I know this has already been asked here, there, and there.
As I struggled for hours finding out the right combination, based on those answers, I thought I would sum it up here, so WE all can find it more clearly and easily.
First of all, it is possible to get Hammer to work flawlessly with Backbone.
To reach this goal, you just need to follow this list :
Create a Hammer Manager instance so you can listen for Hammer events. You should initiate the instance on the same element you are triggering the touch events, or an enclosing one (typically, your view element).
Thus something like this should be present at the end of your View's render()
function :
this.$el.hammer(); // Instantiates Hammer Manager
Listen for an event, as you normally would for any javascript/jQuery event :
events : {
"pan #some_selector": "some_handler",
}
In your event handler, you can access the event's properties within the gesture
attribute, not directly as written in Hammer's documentation, as follows :
function some_handler : function(event) {
console.log(event.gesture.deltaX);
},
This should get Hammer to work flawlessly with your Backbone application. I hope this helps! :)