/** * Theme Customizer enhancements for a better user experience. * * Contains handlers to make Theme Customizer preview reload changes asynchronously. */ ( function( $ ) { // Site title and description. wp.customize( 'blogname', function( value ) { value.bind( function( to ) { $( '.site-title a' ).text( to ); } ); } ); wp.customize( 'blogdescription', function( value ) { value.bind( function( to ) { $( '.site-description' ).text( to ); } ); } ); // Header text 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, .site-description' ).css( { 'clip': 'auto', 'color': to, 'position': 'relative' } ); } } ); } ); // Primary color wp.customize('primary_color',function( value ) { value.bind( function( newval ) { $('.main-navigation, .widget-title, .areview_top_rated_posts_widget, .main-navigation ul ul li').css('background-color', newval ); } ); }); // Secondary color wp.customize('secondary_color',function( value ) { value.bind( function( newval ) { $('.comment-respond input[type="submit"], .read-more, .comment-reply-link, .post-navigation .nav-previous, .post-navigation .nav-next, .paging-navigation .nav-previous, .paging-navigation .nav-next').css('background-color', newval ); $('.author-social a').css('color', newval ); $('.read-more, .comment-respond input[type="submit"], .post-navigation .nav-previous, .post-navigation .nav-next, .paging-navigation .nav-previous, .paging-navigation .nav-next').css('border-color', newval ); } ); }); // Site title wp.customize('site_title_color',function( value ) { value.bind( function( newval ) { $('.site-title a').css('color', newval ); } ); }); // Site description wp.customize('site_desc_color',function( value ) { value.bind( function( newval ) { $('.site-description').css('color', newval ); } ); }); // Entry title wp.customize('entry_title_color',function( value ) { value.bind( function( newval ) { $('.entry-title, .entry-title a').css('color', newval ); } ); }); // Body text color wp.customize('body_text_color',function( value ) { value.bind( function( newval ) { $('body').css('color', newval ); } ); }); } )( jQuery );