Jacob Jacob - 1 year ago 94
Javascript Question

Hammer.js with plain javascript

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

Answer Source

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>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download