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
- Most efficient way to add javascript file to specific post and/or pages?
- Pass media upload value to input field
- Need help setting default setting value for radio button in theme customizer
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- Dynamically change feature image in customiser
- Real time Duplicate title check
- Load custom field value into div with AJAX
- jQuery functions only work on homepage
- Design view breaking on Pages
- How can I loop into two different DIVS without repeating the DIVs
- theme options echoing multiple times
- How to add a dynamic javascript snippet to the footer that requires jQuery
- Stumped – Ajax Response Returns 0
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Parsing php string in jquery [closed]
- doing an ajax request always outputs 0
- Using shipped version of jquery
- How to show a dynamic_sidebar if main content content’s height is > a set amount?
- Choose To Display Post Views With An Options Panel
- Woocommerce add to cart quantity buttons with AJAX
- class click counter save number
- Getting array of customizer settings
- Set the checkbox as checked by default at options page
- Selectbox in admin panel function linking to CSS
- Using if/else statements with output from theme options
- Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- Ajax load more posts with multiple tax query
- WordPress Sending data to Ajax with select option
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- populate form fields in a loop with ajax
- Customizer: Multiple CSS styles on same element in Live Preview
- Gravity form built in Captcha
- Plugins not working on AJAX requests
- How to disable controls in theme customizer?
- 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
- How can i display a jquery slide on front page
- Unset session variable on page reload / setup but exclude AJAX
- Flexslider won’t work on WordPress
- Changing the color scheme based on the url visited
- jQuery Ajax PHP function call returning [object Object]
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- Cloning add_settings_field() with jQuery
- How to load previous or next attachment with jquery ?
- How to set value selected using select2 jquery plugin
- Customizer control save then return to default
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- Custom html/php/jquery map code in WordPress/elementor?
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Why would the child theme load in the Customize preview, but not on the site itself?
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) through wp_admin_ajax.php
- How to check a variable Changes
- Ajax filter with loadmore button
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Customize the “Available for back order” text for specific variation
- If user has clicked link add class and store using PHP/WordPress
- Update $wpdb query with AJAX
- AJAX to add to cart multiple products woocommerce
- wp_set_object_terms returns 500 error when called through AJAX function
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Customizer textarea with script tag won’t work in live preview
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- How to create an Email Subscription input in WordPress?
- Allow user to choose header style
- Styling a specific post after hovering over it
- Remove item from post_meta array via AJAX
- PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "
- Make customizer panel or section button
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- WordPress 404 when using AJAX to call php function
- wordpress ajax pagination
- Submitting my form to the database and then redirecting to payment site
- AJAX Not Working With WordPress Database properly
- Create Customization Controls from Array
- Pass the updated value of aid from form using ajax
- 500 (Internal Server Error) of external php file
- Use jQuery and AJAX to get HTML
- No Authors for custom post type
- Dynamic Gallery
- Missing items on page
- How to change links in the 3 main categories, on widget category, to a javascript function call
- jQuery vs. $ – Creating jQuery scripts in JavaScript in WordPress using External Libraries
- best way to communicate between php and jquery/javascript
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- Cannot get custom javascript to execute on page
- Setting field not saving on front-end
- why my “recepie” category is not taken into account in my request
- Jquery autosave text area after typing
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)