/** * Theme customizer binding File. * * @package Articled * @since Articled 1.0 * */ (function($) { wp.customize('articled_visibility_topbar', function(value) { value.bind(function(newval) { if (newval !== !0) { $('.topest').slideUp() } else { $('.topest').slideDown() } }) }); wp.customize('articled_topbar_right_font_size', function(value) { value.bind(function(newval) { $('.icons i').css({ 'font-size': newval }) }) }); wp.customize('articled_topbar_right_icon_color', function(value) { value.bind(function(newval) { $('.icons a').css({ 'color': newval }) }) }); wp.customize('articled_topbar_right_icon_hover_color', function(value) { value.bind(function(newval) { $('.icons a').hover({ 'color': newval }) }) }); wp.customize('articled_facebook_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.scrb-facebook').hide() } else { $('.scrb-facebook').show() } }) }); wp.customize('articled_twitter_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.scrb-twitter').hide() } else { $('.scrb-twitter').show() } }) }); wp.customize('articled_youtube_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.scrb-youtube').hide() } else { $('.scrb-youtube').show() } }) }); wp.customize('articled_instagram_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.scrb-instagram').hide() } else { $('.scrb-instagram').show() } }) }); wp.customize('articled_google_plus_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.scrb-google').hide() } else { $('.scrb-google').show() } }) }); wp.customize('articled_pinterest_url', function(value) { value.bind(function(newval) { if (newval === '') { $('.fa-pinterest').hide() } else { $('.fa-pinterest').show() } }) }); wp.customize('articled_topbar_left_text', function(value) { value.bind(function(newval) { $('.top-nav .left-p').html(newval) }) }); wp.customize('articled_topbar_left_font_size', function(value) { value.bind(function(newval) { $('.top-nav .left-p').css({ 'font-size': newval }) }) }); wp.customize('articled_topbar_left_font_color', function(value) { value.bind(function(newval) { $('.top-nav .left-p').css({ 'color': newval }) }) }); wp.customize('articled_footer_cp_padding', function(value) { value.bind(function(newval) { $('.copyright-warp').css({ 'padding': newval }) }) }); wp.customize('articled_copyright_text', function(value) { value.bind(function(newval) { $('footer .copyright').html(newval) }) }); wp.customize('articled_footer_cp_font_size', function(value) { value.bind(function(newval) { $('footer .copyright').css({ 'font-size': newval }) }) }); wp.customize('articled_copyright_text_position', function(value) { value.bind(function(newval) { $('footer .copyright').css({ 'text-align': newval }) }) }); wp.customize('articled_footer_cparea_color', function(value) { value.bind(function(newval) { $('.copyright-warp').css({ 'color': newval }) }) }); wp.customize('articled_footer_cp_bg_color', function(value) { value.bind(function(newval) { $('.copyright-warp').css({ 'background-color': newval }) }) }); wp.customize('articled_toggle_bar_color', function(value) { value.bind(function(newval) { $('.toggle-btn span.fa').css({ 'color': newval }) }) }); wp.customize('articled_toggle_bar_bg_color', function(value) { value.bind(function(newval) { $('.toggle-btn').css({ 'border-top-color': newval, 'border-right-color': newval }) }) }); wp.customize('articled_visibility_toggle', function(value) { value.bind(function(newval) { if (newval !== !0) { $('.toggle-btn').fadeOut() } else { $('.toggle-btn').fadeIn() } }) }); wp.customize('articled_visibility_toggle_animate', function(value) { value.bind(function(newval) { if (newval !== !0) { $('.toggle-btn').css({ 'animation': 'none' }) } else { $('.toggle-btn').css({ 'animation': 'abu-toggle-side 5s infinite alternate' }) } }) }); wp.customize('articled_visibility_slider', function(value) { value.bind(function(newval) { if (newval !== !0) { $('.slider-container, .slider').fadeOut() } else { $('.slider-container, .slider').fadeIn() } }) }); wp.customize('articled_slider_opacity', function(value) { value.bind(function(newval) { $('.slider-container').css({ 'background-color': 'rgba(0,0,0,' + newval + ')' }) }) }); wp.customize('articled_slider_width', function(value) { value.bind(function(newval) { $('.slider-container').css('width', newval) }) }); wp.customize('articled_slider_author_bio', function(value) { value.bind(function(newval) { $('.slider-author-desc p').html(newval) }) }) })(jQuery)