Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.