I have some issues with Hammer JS,
in the chrome developer tool I have some errors :
Uncaught ReferenceError: TOUCH_ACTION_COMPUTE is not defined hammer.js:37(anonymous function)
The file seems to be corrupted ? but I downloaded it from hammer js and never opened it...
Uncaught ReferenceError: ifUndefined is not defined hammer.js:9Hammer hammer.js:9(anonymous function) main.js:663j jQuery.js:2k.fireWith jQuery.js:2n.extend.ready jQuery.js:2I
Don't know what this refers to...
jQuery is loaded in first in my HTML page
My script wich calls hammer actions :
var hammer = new Hammer($('img'));
hammer.on("tap", function(ev){
alert(ev);
});
Hope you'll be able to help me, thanks in advance.
$(document).ready(function() { ... });
or something equivalent?new Hammer($('img')[0])
instead, to pass the native DOM element. Alternatively you may want to include the Hammer.js jQuery plugin and use$('img').hammer().bind("tap", function() { ... });
.on
rather thanbind
in my above example).