/** * Notice for Elementor * * @package bigbang */ /* global bigbangElementorNotice */ jQuery( document ).ready( function () { var style = ''; var dialog = style + '
' + '
' + '
bigbang supports default styling for Elementor widgets
' + '
Do you want to disable Elementors\' default styles and use the theme defaults?
' + '
' + 'No' + 'Yes' + '
' + '
' + '
'; jQuery( 'body' ).prepend( dialog ); jQuery( '.bigbang-elementor-notice-buttons > a' ).on( 'click', function() { var reply = jQuery( this ).data( 'reply' ); jQuery.ajax( { url: bigbangElementorNotice.ajaxurl, data: { reply: reply, nonce: bigbangElementorNotice.nonce, action: 'bigbang_elementor_deactivate_default_styles' }, type: 'post', success: function () { if ( reply === 'yes' ) { parent.location.reload(); } else { jQuery( '.bigbang-disable-elementor-styling' ).fadeOut( 500, function() { jQuery( this ).remove(); } ); } } } ); } ); } );