File "script.js"

Full Path: /home/fineflavourcocoa/public_html/wp-content/plugins/kirki/kirki-packages/module-preset/src/script.js
File size: 492 bytes
MIME-type: text/plain
Charset: utf-8

/* global kirkiPresetControls */
jQuery( document ).ready( function() {
	_.each( kirkiPresetControls, function( children, parentControl ) {
		wp.customize( parentControl, function( value ) {
			value.bind( function( to ) {
				_.each( children, function( preset, valueToListen ) {
					if ( valueToListen === to ) {
						_.each( preset.settings, function( controlValue, controlID ) {
							wp.customize( controlID ).set( controlValue );
						} );
					}
				} );
			} );
		} );
	} );
} );