/** * File customizer-controls.js * * The file for generic customizer controls. * * @package azeen */ jQuery( document ).ready( function () { 'use strict'; jQuery( '.focus-customizer-main-bgimage' ).on( 'click', function ( e ) { e.preventDefault(); wp.customize.section( 'background_image' ).focus(); } ); jQuery( '.focus-customizer-social-icontop' ).on( 'click', function ( e ) { e.preventDefault(); wp.customize.panel( 'azeen_socialshare_options' ).focus(); } ); jQuery( '.focus-customizer-menu-topbar' ).on( 'click', function ( e ) { e.preventDefault(); wp.customize.section( 'menu_locations' ).focus(); } ); } ); (function() { wp.customize.bind( 'ready', function() { // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'sidebar-widgets-azeen-footer_sidebar', function( section ) { section.expanded.bind( function( isExpanding ) { // Value of isExpanding will = true if you're entering the section, false if you're leaving it. wp.customize.previewer.send( 'section-highlight-footerwidgets', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.panel( 'azeen_header_options', function( section ) { section.expanded.bind( function( isExpanding ) { // Value of isExpanding will = true if you're entering the section, false if you're leaving it. wp.customize.previewer.send( 'section-highlight-header_options', { expanded: isExpanding }); } ); } ); }); })( jQuery );