PitPik / tinyColorPicker

Tiny jQuery color picker for mobile and desktop with alpha channel
http://www.dematte.at/tinyColorPicker/
MIT License
276 stars 77 forks source link

Minified version doens't work with RequireJS #48

Closed bronboek closed 8 years ago

bronboek commented 8 years ago

When I use the current jqColorPicker.min.js with RequireJS, something goes wrong:

TypeError: $(...).colorPicker is not a function $('.input--color').colorPicker({

When I use the seperate colors.js and jqColorPicker.js files, everything is fine. Probably the AMD wrapper is wrong in the minified version, can you fix this?

PitPik commented 8 years ago

Hi @bronboek, thanks for this finding. colors needs to be defined when using in a single file

define('colors', [], function () {...

The 'colors' made the difference. You can now get the latest version and it will work. Cheers