jquery-ui-touch-punch icon indicating copy to clipboard operation
jquery-ui-touch-punch copied to clipboard

Added AMD support (same as in jQuery)

Open stackh34p opened this issue 9 years ago • 1 comments

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.

stackh34p avatar Sep 18 '16 13:09 stackh34p

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.

ryansullivan avatar Mar 06 '19 18:03 ryansullivan