Sunday, June 2, 2013

Why does the colorpicker js not load with fancybox modal?

Why does the colorpicker js not load with fancybox modal?

So Im trying to add a colorpicker to the fancybox image viewer to change the background color dyanmically. Ive made it display the colorpicker input in the correct place, but the js doesnt seem to load and I just get a standard input box.
Here is the js fiddle for it http://jsfiddle.net/22Tre/1/
Im using the spectrum color picker
http://bgrins.github.io/spectrum/
https://github.com/bgrins/spectrum
The colorpicker loads and works fine when I put the
<input id='colorpicker' />
In my page, but like I said when its gets inserted dynamically with fancybox only an input is displayed. Any ideas you geniuses?