HEX
Server: Apache/2
System: Linux chaudang 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: mgawa (1021)
PHP: 7.3.33
Disabled: NONE
Upload Files
File: /home/mgawa/public_html/wp-content/themes/flatsome2/inc/admin/kirki/assets/js/controls/color.js
wp.customize.controlConstructor['kirki-color'] = wp.customize.Control.extend({

	// When we're finished loading continue processing
	ready: function() {

		'use strict';

		var control = this,
		    picker  = this.container.find( '.kirki-color-control' );

		// If we have defined any extra choices, make sure they are passed-on to Iris.
		if ( undefined !== control.params.choices ) {
			picker.wpColorPicker( control.params.choices );
		}

		// Saves our settings to the WP API
		picker.wpColorPicker({
			change: function( event, ui ) {

				// Small hack: the picker needs a small delay
				setTimeout( function() {
					control.setting.set( picker.val() );
				}, 100 );

			}

		});

	}

});