Theme Customization API and wp.customize 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. ]
The topic ‘Theme Customization API and wp.customize function’ is closed to new replies.