laipower/wp-content/plugins/gp-premium/library/customizer/controls/js/backgrounds-customizer.js

32 lines
835 B
JavaScript
Raw Normal View History

2020-04-07 13:03:04 +00:00
( function( api ) {
api.controlConstructor[ 'gp-background-images' ] = api.Control.extend( {
ready() {
2020-04-07 13:03:04 +00:00
var control = this;
2020-04-07 13:03:04 +00:00
control.container.on( 'change', '.generatepress-backgrounds-repeat select',
function() {
control.settings.repeat.set( jQuery( this ).val() );
2020-04-07 13:03:04 +00:00
}
);
2020-04-07 13:03:04 +00:00
control.container.on( 'change', '.generatepress-backgrounds-size select',
function() {
control.settings.size.set( jQuery( this ).val() );
2020-04-07 13:03:04 +00:00
}
);
control.container.on( 'change', '.generatepress-backgrounds-attachment select',
function() {
control.settings.attachment.set( jQuery( this ).val() );
2020-04-07 13:03:04 +00:00
}
);
control.container.on( 'input', '.generatepress-backgrounds-position input',
function() {
control.settings.position.set( jQuery( this ).val() );
2020-04-07 13:03:04 +00:00
}
);
},
2020-04-07 13:03:04 +00:00
} );
}( wp.customize ) );