Customizer Ajax
This is the JavaScript code used in the underscores theme to preview any change of the setting value without reloading the previewer:
// Site title and description.
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
} );
Instead of using this (from the code above):
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
Can I use the following?
function ( value ) {
$( '.site-title a' ).text( value );
}
Topic underscore theme-customizer Wordpress
Category Web