dimension.js (614B)
1 wp.customize.controlConstructor['kirki-dimension'] = wp.customize.Control.extend({ 2 3 // When we're finished loading continue processing 4 ready: function () { 5 6 'use strict'; 7 8 var control = this, 9 value; 10 11 // Notifications. 12 kirkiNotifications(control.id, 'kirki-dimension', control.params.kirkiConfig); 13 14 var onChange = _.debounce(function (event) { 15 value = jQuery(event.target).val(); 16 control.setting.set(value); 17 }, 600); 18 // Save the value 19 this.container.on('change keyup paste', 'input', onChange); 20 21 } 22 23 });