Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jquery.hammer.js can't used in requirejs #331

Closed
xzf158 opened this issue Aug 1, 2013 · 5 comments
Closed

jquery.hammer.js can't used in requirejs #331

xzf158 opened this issue Aug 1, 2013 · 5 comments

Comments

@xzf158
Copy link

xzf158 commented Aug 1, 2013

I try to used now version hammer in my project. I loaded jquery.hammer.js in requirejs.
line 1453 will throw a error: Hammer is not defined.
I found when used requirejs, object Hammer not used like window.Hammer = Hammer,
when line 1453 used Hammer, will has error.

@jantimon
Copy link

I ran into the same issue.

The bug is easy to reproduce as seen in this fiddle:
http://jsfiddle.net/HNsQm/1/

My fork contains a patch which adds a define configuration:
jantimon@c9711ac

This configuration fixes the issue:
http://jsfiddle.net/HNsQm/2/
http://jsfiddle.net/HNsQm/3/

@jantimon
Copy link

Please let me know if I missed sth.

Demo for dist/jquery.hammer.js
http://jsfiddle.net/HNsQm/4/

Demo for dist/hammer.js + plugins/jquery.hammer.js
http://jsfiddle.net/HNsQm/5/

@xzf158
Copy link
Author

xzf158 commented Aug 20, 2013

It's right now, thanks a lot.

@pruett
Copy link

pruett commented Aug 29, 2013

@jantimon solution worked for me, thanks

jtangelder added a commit that referenced this issue Sep 3, 2013
Fixes issue #331 -  "jquery.hammer.js can't used in requirejs"
@jtangelder
Copy link
Member

Issuebot:
This issue is auto-closed because it's last activity was too long ago.
If you think the issue is still active, please re-open it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants