/** * Script for page builders integration * * @package bigbang */ /* global bigbangBuilderIntegration */ jQuery( document ).ready( function () { jQuery( '.main > section:not(#about)' ).each( function() { if ( jQuery( this ) !== 'undefined' ) { jQuery( this ).append( '' + bigbangBuilderIntegration.hideString + '' ); } } ); jQuery( '.bigbang-pagebuilder-section-remove' ).on( 'click', function() { var clickedSection = jQuery( this ).parent().parent(); var sectionId = jQuery( clickedSection ).attr( 'id' ); jQuery.ajax( { url: bigbangBuilderIntegration.ajaxurl, data: { section: sectionId, nonce: bigbangBuilderIntegration.nonce, action: 'bigbang_pagebuilder_hide_frontpage_section' }, type: 'post', success: function() { jQuery( clickedSection ).fadeOut(); } } ); } ); } );