How to hook on customizer section expanded/active/opened event?

Here it is

wp.customize.bind( 'ready', function() {

    wp.customize.section.each( function ( section ) { 

        section.expanded.bind( function( isExpanding ) {

            if(isExpanding){

                console.log(section);
            }


        });


    });
});

Leave a Comment