I\'m working on a mobile web site that has to work on a variety of devices. The one\'s giving me a headache at the moment are BlackBerry.
We need to support both key
Just adding return false; at the end of the on("click touchstart") event function can solve this problem.
$(this).on("click touchstart", function() {
// Do things
return false;
});
From the jQuery documentation on .on()
Returning
falsefrom an event handler will automatically callevent.stopPropagation()andevent.preventDefault(). Afalsevalue can also be passed for the handler as a shorthand forfunction(){ return false; }.