(function($){ wp.customize('bigseotheme_ads_header', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_header').html(newval); } ); }); wp.customize('bigseotheme_ads_after_title', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_after_title').html(newval); } ); }); wp.customize('bigseotheme_ads_after_content', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_after_content').html(newval); } ); }); wp.customize('bigseotheme_ads_top_sidebar', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_before_sidebar').html(newval); } ); }); wp.customize('bigseotheme_ads_aside', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_aside').html(newval); } ); }); wp.customize('bigseotheme_ads_footer', function(value) { value.bind(function(newval) { $('.bigseotheme_ads_footer').html(newval); } ); }); wp.customize( 'bigseotheme_link_color', function( value ) { value.bind( function( newval ) { $('.entry-content a').css('color', newval ); } ); } ); wp.customize( 'bigseotheme_navbar_background', function( value ) { value.bind( function( newval ) { $('.navbar, nav.site-navigation').css('background-color', newval ); } ); } ); wp.customize( 'bigseotheme_navbar_link_color', function( value ) { value.bind( function( newval ) { $('.navbar a').css('color', newval ); } ); } ); wp.customize( 'bigseotheme_container_size', function( value ) { value.bind( function( newval ) { $('.container, .container-navbar, .footer-container').css('width', newval ); } ); } ); wp.customize( 'bigseotheme_typo_logo', function( value ) { value.bind( function( newval ) { $('head').append(''); $('.site-brand a').css('font-family', newval ); } ); } ); wp.customize( 'bigseotheme_typo_headings', function( value ) { value.bind( function( newval ) { $newvalarray = newval.split(':'); console.log($newvalarray); $('head').append(''); $('h1,h2,h3,h4,h5,h6').css({ "font-family": $newvalarray[0], "font-weight": $newvalarray[1], }); } ); } ); wp.customize( 'bigseotheme_typo_body', function( value ) { value.bind( function( newval ) { $('head').append(''); $('body').css('font-family', newval ); } ); } ); wp.customize( 'bigseotheme_sidebar_relation', function( value ) { value.bind( function( newval ) { $('.site-main').css('flex-basis', 100 - newval + '%'); $('.site-main').css('max-width', 100 - newval + '%'); $('.site-aside').css('flex-basis', newval + '%'); $('.site-aside').css('max-width', newval + '%'); } ); } ); wp.customize( 'bigseotheme_sidebar_position', function( value ) { value.bind( function( newval ) { $('.site-aside').css('order', newval ); } ); } ); wp.customize( 'bigseotheme_loop_read_more', function( value ) { value.bind( function( newval ) { $('.entry-read-more').html(newval); } ); } ); })(jQuery);