WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple individual color pickers set up in the theme customizer, which results in several instances of the farbtastic color picker.

I am trying to find the jQuery/JavaScript instance variable for each of these, just can't seem to find a reference to them anywhere. I want to be able to set each farbtastic color manually, i.e. I need to access the color pickers setColor() method.

As a test, I can set a global JS var in customize-controls.js, in the color picker section, and can access this via Chrome console easy enough. But I need to do the same thing by accessing the default farbtastic instances. I just can't find them!

share|improve this question
How did you set up the color pickers? Some code please! – toscho Oct 7 '12 at 4:16
It's not really to do with how I specifically set up the color pickers. If you activate the Twenty Eleven theme and take a look at the theme customizer you'll see a color picker for the page background color. I just need to be able to find the object handle for this so in Chrome developer tools (for example) I could just enter something like instancename.setColor('#ccc'); to programatically set the color. – dgwyer Oct 8 '12 at 11:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.