I want to capture pinch events on an image in a webpage using hammer.js (or anything else is also fine). I've got two implementations of which neither works as expected. I'm testing with Android 4.1 and chrome, but would like it to be a cross browser solution (ha! if that exists...)
The first doesn't fire the pinch events at all. http://jsfiddle.net/7EV56/9/
$elem.hammer()
.on("pinchin", function (evt)
{
//do stuff
}).on("pinchout", function (evt)
{
//do stuff
});
The second fires the pinch events perfectly, but then I can't pan/scroll anymore. http://jsfiddle.net/7EV56/8/
$elem.hammer({prevent_default:true})
.on("pinchin", function (evt)
{
//do stuff
}).on("pinchout", function (evt)
{
//do stuff
});