Try to replace
$( ':root' ).css( '--primary', to );
with
$( ':root' ).get(0).style.setProperty( '--primary', to );
Related Posts:
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Customizer – Prefix Class Extension
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- How to add drag and drop functionalities to a div inside option panel
- what does $options = get_option(‘test_theme’); do?
- Illegal string offset in PHP function in via Theme Customizer
- Remove specific javascript when viewing page in Customizer?
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- WordPress Customizer – How to save list of checkbox of pages?
- Partial refresh in WordPress live preview
- Can’t find elemnts on the DOM using Custom Control in Customizer API
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- AJAX pagination, update current page
- Limit Widgets to Sidebar ID’s
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- Customizer: active_callback and sanitize_callback incompatibility?
- Change “add to cart” button color based on Woocommerce product category [closed]
- Return a numerical function value in Customizer controls
- How can I get the values of my WordPress $wpdb query in Jquery?
- Ajax request returns ‘Array’. How to output the actual results?
- Customizer: Multiple CSS styles on same element in Live Preview
- Ajax load more button for comments wordpress
- Slick + PHP + ACF + JQuery slide reveal not working
- How to add a do_action on refreshing of WP customizer?
- Customizer: Category Select Sanitize
- Gravity form built in Captcha
- Menu jumping when calling it via PHP
- Problem custom control Customizer
- Setting value of session with Ajax not working
- Click a radio button must set textfield value
- WordPress Multiple Navigation bars
- [jQuery]Adding shortcode
- multiple taxonomy select display only one in front end
- Display parent and child taxonomies in separate drop down select fields
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Skt full width basic slideshow problem
- Add / Update Custom Fields After Select Pictures in Media Window
- Post repeating with infinite scroll
- Plugins not working on AJAX requests
- Fancybox type popup window that’s not an iframe
- How to disable controls in theme customizer?
- Error: options page not found
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- JQuery calling a Custom PHP function (Works in Dev but not in WordPress)
- Jquery function working in Dev Console but not otherwise [duplicate]
- WordPress theme options error
- Form Security: nonce vs. jQuery
- How do I Import / Upload Files with jQuery AJAX?
- WordPress admin-ajax.php 400 bad request
- Why does wp_head hook my functions to the beginning of my source code?
- WordPress Ajax Call inserting data but success response false
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- Ajax contact form return 0
- How can i display a jquery slide on front page
- AJAX – Returning Two JSON Objects with One PHP Function
- WordPress Options Page Theory Question
- Pull GetOption() variable into jQuery dynamically created html
- Royalty-Free Sliders used in theme development
- Error – ‘create_function is deprecated’ [closed]
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- How to check if a Customizer setting is set?
- Unset session variable on page reload / setup but exclude AJAX
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- WordPress Customizer Default Image
- Is it save to use eval for a jQuery callback method coming from the database?
- Jquery window.send_to_editor function
- Double jQuery loaded
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- Flexslider won’t work on WordPress
- Function won’t run onclick using Ajax
- Warning: Illegal string offset on theme options page [closed]
- Changing the color scheme based on the url visited
- Javascript not loading on certain page
- Theme not calling Jquery properly
- Link blogname and blogdescription to the Options Framework
- How to keep track of when a vote is cast?
- WordPress plugin admin page – using WordPress function in linked php file
- How to make jquery count down timer function manually editable
- Extending WP_Customize_Media_Control to return filename
- Please show me how to use an if/else statement in combination with wp_enqueue
- A $_POST should occur when submit form but is not?
- My jQuery Ajax form submit is still refreshing page?
- jQuery Ajax PHP function call returning [object Object]
- How to use the wpsnonce clone post link?
- Shortcode to pull posts
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- Undefined index for default custom theme option
- Output votes to div dynamically in wordpress
- Get uploaded image and attach it to the new post
- Customizer: How to change Header Image description
- Admin-ajax php not working on new wordpress version
- How to add post thumbnail dynamically using Jquery?
- Proper way to use WordPress function with AJAX PHP file
- calling function in external js file