jQuery( document ).ready( function( $ ) { /** * Real-time preview of the site title and description text */ wp.customize( 'blogname', function( value ) { value.bind( function( to ) { $( '.site-title a' ).html( to ); } ); } ); wp.customize( 'blogdescription', function( value ) { value.bind( function( to ) { $( '.site-description' ).html( to ); } ); } ); /** * Real-time preview of the site title color */ wp.customize( 'header_textcolor', function( value ) { value.bind( function( to ) { if ( 'blank' == to ) { $( '.site-title, .site-description' ).css( { 'clip': 'rect(1px, 1px, 1px, 1px)', 'position': 'absolute' } ); } else { $( '.site-title a' ).css( { 'color': to } ); $( '.site-title, .site-description' ).css( { 'clip': 'auto', 'position': 'relative' } ); } } ); } ); });