Sindbad~EG File Manager

Current Path : /www/wwwroot/33win.is/wp-content/plugins/olympus-google-fonts/assets/js/
Upload File :
Current File : /www/wwwroot/33win.is/wp-content/plugins/olympus-google-fonts/assets/js/multiple-checkbox.js

wp.customize.controlConstructor[ 'ogf-multiple-checkbox' ] = wp.customize.Control.extend( {

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

		const control = this;

		// Save the value
		control.container.on( 'change', 'input', function() {
			const value = [];
			let i = 0;

			// Build the value as an object using the sub-values from individual checkboxes.
			jQuery.each( control.params.choices, function( key ) {
				if ( control.container.find( 'input[value="' + key + '"]' ).is( ':checked' ) ) {
					value[ i ] = key;
					i++;
				}
			} );

			// Update the value in the customizer.
			control.setting.set( value );
		} );
	},

} );

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists