views:

6246

answers:

5

I have heard that jQuery UI includes a Colo(u)r Picker but could find little documentation regarding it.

Does it exist? Any decent documentation on how to implement it?

I found this: http://docs.jquery.com/UI/Colorpicker

But using:

$("#colorpicker").colorpicker();

does not work, with Firebug telling me .colorpicker(); is not a method! GGGGGGGGGAHHHHHHHHH

Ok it seems to work fine, unless I put it in a dialog UI where it then decides to break...

Help :)?

A: 

Make sure you have jQuery UI base and the color picker widget included on your page (as well as a copy of jQuery 1.3):

<link rel="stylesheet" href="http://dev.jquery.com/view/tags/ui/latest/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)">

<script type="text/javascript" src="http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js"&gt;&lt;/script&gt;

<script type="text/javascript" src="http://dev.jquery.com/view/tags/ui/latest/ui/ui.colorpicker.js"&gt;&lt;/script&gt;

If you have those included, try posting your source so we can see what's going on.

ajm
A: 

I can't also download it. Perhaps it is abandoned. You can find an alternative here.

kgiannakakis
+2  A: 

You can find some demos and plugins here.

http://jqueryui.pbworks.com/ColorPicker

shin
Looks good :) +1
Shadi Almosri
Yup, I shall try this tommorow. Cheers
Damien
A: 

Colorwheel on github.com is another option. It uses Raphael to draw the color picker, rather than using a PNG or other graphic.

The Who
A: 

Had the same problem (is not a method) with jQuery when working on autocomplete. It appeared the code was executed before the autocomplete.js was loaded. So make sure the ui.colorpicker.js is loaded before calling colorpicker.

PoweRoy