/** * File blogever-customize-preview.js. * * Instantly live-update customizer settings in the preview for improved user experience. */ // site blogname (function( $ ) { // Site title and description. wp.customize( 'blogname', function( value ) { value.bind( function( to ) { $( '.blogever-header-left a' ).text( to ); }); }); wp.customize( 'blogdescription', function( value ) { value.bind( function( to ) { $( '.blogever-header-left p' ).text( to ); }); }); wp.customize( 'blogever_instagram_title_setting', function( value ) { value.bind( function( to ) { $( '.blogever-footer-instagram-main h4 a' ).text( to ); }); }); wp.customize( 'blogever_newsletter_heading_setting', function( value ) { value.bind( function( to ) { $( '.blogever-postoptionboxheading' ).text( to ); }); }); wp.customize( 'blogever_newsletter_paratext_setting', function( value ) { value.bind( function( to ) { $( '.blogever-postoptioninner .blogever-subheading' ).text( to ); }); }); wp.customize( 'blogever_footer_newsletter_heading_setting', function( value ) { value.bind( function( to ) { $( '.blogever-footer-optin-heading' ).text( to ); }); }); wp.customize( 'blogever_footer_newsletter_paratext_setting', function( value ) { value.bind( function( to ) { $( '.blogever-footer-sub-heading' ).text( to ); }); }); wp.customize( 'blogever_footer_copyrights_setting', function( value ) { value.bind( function( to ) { $( '.blogever-footer-attribution p' ).text( to ); }); }); wp.customize( 'blogever_blogrelated_title_setting', function( value ) { value.bind( function( to ) { $( '.blogever-blogrelatedentrytitle h6' ).text( to ); }); }); wp.customize( 'blogever_deal_getmore_text_setting', function( value ) { value.bind( function( to ) { $( '.blogever-deals-page-more' ).text( to ); }); }); wp.customize('blogever_bodyfontsize_setting', function( value ) { value.bind( function( to ) { $('body').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_body_lineheight_setting', function( value ) { value.bind( function( to ) { $('body').toggleClass('blogever_body'); $('body').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h1fontsize_setting', function( value ) { value.bind( function( to ) { $('h1').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h1lineheight_setting', function( value ) { value.bind( function( to ) { $('h1').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h2fontsize_setting', function( value ) { value.bind( function( to ) { $('h2').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h2lineheight_setting', function( value ) { value.bind( function( to ) { $('h2').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h3fontsize_setting', function( value ) { value.bind( function( to ) { $('h3').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h3lineheight_setting', function( value ) { value.bind( function( to ) { $('h3').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h4fontsize_setting', function( value ) { value.bind( function( to ) { $('h4').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h4lineheight_setting', function( value ) { value.bind( function( to ) { $('h4').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h5fontsize_setting', function( value ) { value.bind( function( to ) { $('h5').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h5lineheight_setting', function( value ) { value.bind( function( to ) { $('h5').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h6fontsize_setting', function( value ) { value.bind( function( to ) { $('h6').css({'font-size':''+to+'px','opacity':1}); }); }); wp.customize('blogever_h6lineheight_setting', function( value ) { value.bind( function( to ) { $('h6').css({'line-height':''+to+'px','opacity':1}); }); }); wp.customize('background_color', function( value ) { value.bind( function( to ) { $('body').css({'background-color':to,'opacity':1}); }); }); } )( jQuery );