I think the part you may be missing is that you don’t have to use the value that is passed to the function. You can still reference the setting inside the callback function, including other settings. So you can do this:
// Run a callback when both of the settings are registered.
wp.customize( 'yeah[part_one]', 'yeah[part_two]', ( part_one, part_two ) => {
// Run callback when part one is changed.
part_one.bind( () => {
$( '#htmlcss > location > yes-in' ).css( { 'specificcode': part_one.get() } );
} );
// Run callback when part two is changed, but using the values of both part one and two.
part_two.bind( () => {
$( '#htmlcss > location > yes-ok' ).css( { 'specificcode': part_one.get() + part_two.get() } );
} );
} );
Related Posts:
- Customizer JS API
- Is it Possible to Extend WP Customize JS Methods?
- wp.customize.bind ready event not fired
- Detecting WordPress Customizer Panel
- WP Customizer set a value via javascript (to create presets)
- wp_customize_support_script – do I need it?
- Customizer – instantiating settings and controls via javascript
- Customizer JS API: Defining control settings
- Customizer JS API: Adding Setting Dynamically Not Working
- Customizer: When to use customize_preview_init VS customize_controls_enqueue_scripts
- How to overwrite JS variable with wp_localize _script?
- Theme Customiser not live previewing changes on pseudo elements
- the Customizer – proper way to instantiate an image upload control via javascript
- Preserve Javascript Through Customizer Preview Navigation
- How to check if customize previewer is refreshing?
- JavaScript in WordPress Customizer
- Customizer JS API: Adding a “dropdown-pages” control
- Accessing customizer values in javascript
- Running JS after theme customizer finished initialization
- customize_preview_init: listening for any changes from Customizer preview area
- How to conditionally show/hide controls & sections in WordPress customizer?
- Multiple Conditional Controllers
- WordPress customizer get control
- Using webpack to add customizer live preview functionality – wp.customize is not a function
- Adding and removing hidden buttons from WordPress Customizer Tinymce widget editor using javascript API
- Get a default value of the Customizer setting using wp.customize API (JS)
- How to add customizer control via javascript ( wp.customizer.control.add )
- Load page in customizer preview on panel click?
- Customizer JS API: Defining active_callback for a section
- Adding Code into Theme Customizer Header
- Custom JS text area in customizer is being formatted wrong in document
- customize-controls.js – extend api.previewer
- Show sections based on a control in WordPress Customizer using JS API
- How do I add a class to Customizer preview based on class of Customizer control? (Customizer Javascript API)
- LayersWP Customizer White Blank Screen
- Get a default customizeAction text for a section using Customizer JS API
- Receive “menu-toogle” event from section menu in customizer
- Invariant Violation: Objects are not valid as a React child
- How to get all place details from a Place Details Request using Google Places API Web Service?
- How do I check whether a checkbox is checked in jQuery?
- Heroku: “No default language could be detected for this app” error thrown for node app
- Loop inside React JSX
- How do I loop through or enumerate a JavaScript object?
- Getting Unexpected Token Export
- Setting a backgroundImage With React Inline Styles
- Filter array to have unique values
- What’s the difference between “Array()” and “[]” while declaring a JavaScript array?
- Mouseover & Mouseout w/ Javascript
- Format JavaScript date as yyyy-mm-dd
- Programmatically change the src of an img tag
- Unable to preventDefault inside passive event listener
- Scroll Automatically to the Bottom of the Page
- npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself
- How do I check if string contains substring?
- What does “export default” do in JSX?
- Cannot find module ‘internal/fs’ after upgrading to node 7
- How can I select an element by name with jQuery?
- Initializing an Array with a Single Value
- Is it possible to stop JavaScript execution?
- Remove commas from the string using JavaScript
- How can you remove all documents from a collection with Mongoose?
- TypeError: ‘undefined’ is not an object
- Uncaught TypeError: Cannot read property ‘appendChild’ of null
- javascript setTimeout() not working
- Retrieve the position (X,Y) of an HTML element
- command not found: jest
- Preloading images with jQuery
- socket.io – ReferenceError: io is not defined
- What is the difference D3 datum vs. data?
- How to check if a number is between two values?
- Simulate a click on ‘a’ element using javascript/jquery
- How can I remove a style added with .css() function?
- Error: Couldn’t find preset “es2015” relative to directory “/Users/username”
- Using Angular 2 without TypeScript Transpiler
- Trigger Javascript on Gutenberg (Block Editor) Save
- How to intercept already localized scripts
- Show control conditionally in Gutenberg
- Trigger Customizer saving process with Javascript only
- Want image captions to be from img ALT tags not title tags
- How to add a “data-” attribute to the image tag of native gallery output
- Post to WordPress using REST API from external site
- Rest API invalid nonce with Backbone Client
- Gutenberg block “This block appears to have been modified externally” on save
- 404 Error Contact Form 7 on WordPress
- window.send_to_editor throws unterminated string literal error when adding image with multi line description
- Gutenberg get core data – search
- Add custom classes for blocks in editor based on custom attributes
- How to use Readmore.js? [closed]
- Trying to turn the Edit function into a class to be able to use React lifecycle methods
- Return ‘X-WP-Total’ from headers in response
- Javascript asset not enqueuing with the rest
- how to add a custom javascript file to our theme
- WordPress Guternberg Content For React Native
- Custom block update rendering when reused
- How do I add my own scripts to the add_action(‘wp_enqueue_scripts’) function?
- Post title and url not showing on google map marker [closed]
- Including js script at end of header
- Embed Kajabi into WP
- Google AdSense Ad not showing up in WordPress Blog [closed]
- Why is this script not working?