Bob
Bob

Reputation: 3084

JQuery Simple Colour Picker Click Not Firing

I've downloaded the Really Simple Color Picker in jQuery from this site

I've followed the instructions, an implemented the colorpicker like so:

The HTML

<input id="DashboardTreeHeaderFontColour" type="text" value="#333399"/>

The Javascript

$(document).ready(function () { $("#DashboardTreeHeaderFontColour").colorPicker() });

The small colour box is created, but clicking on it does nothing (it's suppoed to show the other colour options for you to choose from)

I'm using the latest Jquery.

Thanks for any help.

Regards, Byron Cobb

Upvotes: 1

Views: 216

Answers (1)

Andy E
Andy E

Reputation: 344803

I set up an example using your exact code, importing the script and CSS files from the demo page. It works fine in IE, Firefox and Chrome. I would check the following:

  • The swatch that appears needs to be properly styled, make sure you have declared CSS rules for it. Just copy the rules from the demo page to begin with, then you can edit them to style it how you like.
  • Make sure you don't have any conflicting CSS rules. The id of the colour swatch that appears is color_selector.
  • Check you're using the latest version of the file (released October 2009).
  • Look in your web debugger (Firebug, IE dev tools, Chrome dev tools, etc) and try and find the element.
  • Check your script console in the web debugger and see if you have any errors when clicking the input.

Upvotes: 2

Related Questions