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

Added AMD support (same as in jQuery) #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stackh34p
Copy link

Good job with the library! Unfortunately I am using require.js and the plugin did not work because jquery-ui was loaded in the AMD fashion. When using AMD to load touch-punch it fails since it expected a global jQuery variable to exist.

The pull request contains a wrapper function around the plugin that enables AMD support.

Because this plugin relies on jquery-ui to be loaded as well, it must be defined in an AMD loader in a way so it depends on both jquery and jquery-ui in order to properly work.

@ryansullivan
Copy link

Thank you so much! After updating jquery-ui I began receiving the following error in responsive, even though touch-punch continued to work:

"Uncaught TypeError: Cannot read property 'mouse' of undefined"

This change got that annoying bugger to disappear.

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

Successfully merging this pull request may close these issues.

2 participants