If you’re using the built in custom background stuff, it’s already all using postMessage.
So, just bind a function to the background_color
message and adjust your border color accordingly.
Something like this, I expect:
wp.customize('background_color',function( value ) {
value.bind(function(to) {
jQuery('whatever').css('color', to ? to : '' );
});
});
Obviously, change the jQuery call in the middle to adjust whatever you’re trying to adjust.
Some of the basics I didn’t cover, such as hooking that JS into the previewer and such, are here:
http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes/
Related Posts:
- Is there any way to register custom background images like header images?
- How do I remove a pre-existing customizer setting?
- Theme customizer – settings order
- Custom Image section in Customizer
- How do I add settings to the Background Options Page?
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- Add a dropdown to theme customizer
- Allow Shortcode in Theme Customizer
- Theme Customizer – Nested Sections?
- Can I create customizer setting that can handle plugin shortcode?
- Editing the custom background CSS
- Is the theme customizer slowing down my site?
- WordPress Customize — Move “menus” options / field to another section
- Multiple Custom_Background, is it possible?
- Changing the entire control choices using wp.customize with JavaScript
- How to remove menus section from WordPress theme customizer
- Checking if there is an Image inserted – if not don’t display anything
- Default header image does not display
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify the Additional CSS section (adding a disclaimer)
- Theme Customizer – Choose where widget area appears, to let users organise widgets
- wordpress custom theme import and export options for sample data [closed]
- How to hook CSS file according to theme selection in the customizer section
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Custom Script Section Only Echoes Text
- WordPress not registering Theme Customization Section
- WP Customize refresh problem
- How to add new args data in $wp_customize->add_setting?
- Hide header texts (Title & Tagline) in custom-header.php
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- Using an if statement in the theme customizer page
- Theme-wide custom post template
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- JavaScript stops working on selectively refreshed sections one inside the other
- Folder name for a pro version of a WordPress.org theme?
- Display theme layouts [closed]
- Customizer: save setting/control content to post/page
- Using WordPress’ Theme Customizer to select page templates that update layout in the preview
- Dynamically generated wordpress customizer options?
- Is accessing theme and using customizer GPL distribution?
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How to enqueue javascript for WP Customize options sidebar?
- Is it possible to visually group items on the theme customizer?
- Theme Customizer not loading JS for live preview
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Change WordPress header color using customizer
- Default Text not showing from customizer
- How to transfer one domain to another domain without losing theme options (customizer)?
- Theme Customizer not displaying saved values in wp_head (CSS)
- How to allow certain PHP functions when using sanitize_callback in the word press customizer
- Customizer Color Control Not Working
- where is real values of variables?
- How to allow users to create their own website within my domain? [closed]
- Doing context-aware previews in the WordPress Customizer
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Alignment Problem [closed]
- Avada Child Theme Development
- Questions from a new WP Dev [closed]
- Adding a new setting using Kirki or WP customizer with an if statement
- Theme customizer – can’t add section/settings
- Twenty Twelve Author not displaying
- How to add wysiwyg editor in customize screen using customize_register
- How to register dynamic settings in WordPress Customizer?
- How to copy page/post from one theme to another?
- How to change listing type permlink?
- In wordpress customizer div still showing even if I hid it with javascript
- How to enable admin to upload multiple images to support header carousel slider theme in WordPress?
- Removing element from DOM with jquery through plugin Custom Scripts for Customizer
- Why does wp_customizer default values do not apply when theme is installed for the first time?
- Customizer API Multi Sections in single Panel
- How Do I Create a WordPress Demo Site with Limited Admin Access
- Fatal error: Class WP_Customize_Image_Control not found
- What is difference between add_theme_support and Theme Customization API?
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- How do I remove header/page-title image in farvis theme? [closed]
- How to show Custom Field Value in Woocommerce Shop Page
- How to show some of category in wordpress
- Duplicate child theme incl. design changes
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Import settings from another theme
- Nav menus Fast previewing not working with wp_get_nav_menu_items!
- Customizer Image-Picker Preview Not Working
- How to customize the colors within a stylesheet using a WordPress setting
- Correct was to customise theme using get_theme_mod in scripts
- How to get url image page the right way?
- How to create multiple customizer controls in one control
- Load get_page_templates into select menu
- WordPress Customizer Help with FontAwesome Icon
- WordPress Customization API overwrite LESS variable
- Replaceing _custom_background_cb
- Customizer API way function is_customize_preview() works only in main page?
- “No Data Received” error in Chrome every time i try to update the theme functions file
- trying to figure out how to use more that one image upload in the same section in theme customizer
- How to Disable Color Options?
- How do I make it super customisable?
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- My theme is full of error messages in the “Customize” screen, but nowhere else