PCA
PCA

Reputation: 1707

Uncaught TypeError: t.addEventListener is not a function in hammer.js in chrome browser

I have been using the hammer.js and jquery.hammer.js. In hammer.js i'm getting the addEventListesener error that is in chrome browser.

And the version which i'm using is 1.0.6, both hammer.js and jquery.hammer.js.

If any one faced this kind of error, please let us know it.

thanks

enter image description here

Upvotes: 0

Views: 3672

Answers (1)

A.Rady
A.Rady

Reputation: 11

I had this same issue and after some research I figured it out. You need to download the jquery plugin from hammers GitHub.(https://github.com/hammerjs/jquery.hammer.js)

If your using it for a swipe feature you code should look something like this...

$(".element").hammer().on("swiperight", function(){
  //code her
});

Upvotes: 1

Related Questions