Title: Theme Customization API and wp.customize function
Last modified: August 20, 2016

---

# Theme Customization API and wp.customize function

 *  [sclerato](https://wordpress.org/support/users/sclerato/)
 * (@sclerato)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/theme-customization-api-and-wpcustomize-function/)
 * Hi all,
 * Im “playing” with the Customization API, for live colors on a theme.
 * As you know on the javascript that live-changes color on something, as wordpress
   reference teaches you use a code like:
 *     ```
       wp.customize( 'your_color_option', function( value ) {
         value.bind( function( newval ) {
           $('.main-menu').css('background-color', newval );
         } );
       } );
       ```
   
 * Instead of having thousand of similar function for every color option, i would
   like to be able to get the name of the option changed from the customization 
   panel.
    In short retrieve ‘your_color_option’ in this case.
 * Any way i could do that? Can someone help im kinda nub in js-oop 🙂
    Thanks
 * _[ Please do not bump, that’s [not permitted here](http://codex.wordpress.org/Forum_Welcome#No_Bumping).]_

The topic ‘Theme Customization API and wp.customize function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [sclerato](https://wordpress.org/support/users/sclerato/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/theme-customization-api-and-wpcustomize-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
