How to import hammer without using `<script>` tag
See original GitHub issueI’m using vanilla JS es6 (2015) and I’m trying to import hammer. I can’t seem to find any documentation on how to use these modules instead of using the <script>
tag. Is there any way to do this or is the <script>
tag the only way?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Hammer.js with plain javascript - Stack Overflow
Bind hammer to a container element: var hammer = new Hammer(document.getElementById("container"));. Now, on every gesture that is performed ...
Read more >Getting Started - Hammer.js
Hammer is a open-source library that can recognize gestures made by touch, mouse and pointerEvents. It doesn't have any dependencies, and it's small, ......
Read more >Drag with Hammer.js example - CodePen
Drag an item around with Hammer.js Forked from [Jorik Tangelder](http://codepen.io/jtangelder/)'s Pen [Basic Hammer.js example](http://codepen.io/jta...
Read more >How to use the hammerjs.Pinch function in hammerjs - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... import Animate from 'rc-animate'; import...
Read more >I don't know how to use hammer.js to transition my slides
I'm using the slideshow code from here, https://www.w3schools.com/howto/howto_js_slideshow.asp , and want to use hammer.js here, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just in case anybody else finds this - actually you can use Hammer as an ES6 module.
If it’s installed via NPM, use:
Thereafter, from the same file you can use Hammer as
window.Hammer
, and in other files you can just useHammer
.I am using Angular2, and for me
worked.