Jacob Jacob - 11 months ago 56
Javascript Question

Hammer.js with plain javascript

How to use hammer JS events without JQuery selectors just using plain Javascript methods?


Just a quick look over the GitHub documentation:

var hammer = new Hammer(document.getElementById("container"));

creates a 'hammer' without jQuery. After that you can set callback functions, you don't need any jQuery for that too. But beware! HammerJS might need jQuery internally, so it is possible you can't leave out the <script src="path/to/jquery.js"></script>