ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

reset.js (417B)


      1 jQuery( document ).ready( function() {
      2 
      3 	'use strict';
      4 
      5 	jQuery( 'a.kirki-reset-section' ).on( 'click', function() {
      6 
      7 		var id       = jQuery( this ).data( 'reset-section-id' ),
      8 		    controls = wp.customize.section( id ).controls();
      9 
     10 		// Loop controls
     11 		_.each( controls, function( control, i ) {
     12 
     13 			// Set value to default
     14 			kirkiSetSettingValue( controls[ i ].id, control.params['default'] );
     15 
     16 		});
     17 
     18 	});
     19 
     20 });