Your IP : 216.73.216.44


Current Path : /home/krobertfnz/www/wp-content/themes/nex/vamtam/customizer/lib/assets/js/
Upload File :
Current File : /home/krobertfnz/www/wp-content/themes/nex/vamtam/customizer/lib/assets/js/responsive-position.js

(function( $, undefined ) {
	'use strict';

	wp.customize.controlConstructor['vamtam-responsive-position'] = wp.customize.Control.extend({
		ready: function() {
			var control = this,
			    value   = JSON.parse( JSON.stringify( this.params.value ) );

			console.log( this );

			this.container.on( 'change', 'input[type=number]', function( e ) {
				let where = e.target.id.match( /(\w+)-(\w+)$/ );

				value[ where[1] ][ where[2] ] = e.target.value;

				control.setting.set( JSON.parse( JSON.stringify( value ) ) );
			});
		},
	});
})( jQuery );