I want my backbone app to behave nicely on mobile devices. Does it makes sense to replace 'click' events with 'touchend' events?
var CoolView = Backbone.View.extend({
el : $("#coolEl"),
events: {
'touchend' : 'clickHandler'
}
});
add it to the events object?
var CoolView = Backbone.View.extend({
el : $("#coolEl"),
events: {
'click' : 'clickHandler',
'touchend' : 'clickHandler'
}
});
something else?
You can use the Backbone.touch plugin which will replace the click events to touch events if the device is mobile.