Current File : /home/kelaby89/babyl0n.restaurant/wp-content/plugins/restar-core/assets/js/restar-core.js |
/*
[Main Script]
Project: Restar
Version: 1.0
Author : Themeholy
*/
;(function($){
"use strict";
jQuery(window).on( 'elementor/frontend/init', function() {
// console.log( elementorFrontend);
if( typeof elementor != "undefined" && typeof elementor.settings.page != "undefined" ) {
elementor.settings.page.addChangeCallback( 'restar_header_style', function ( newValue ) {
if( newValue == 'prebuilt' ) {
elementor.saver.update({
onSuccess: function() {
elementor.reloadPreview();
elementor.once( 'preview:loaded', function() {
elementor.getPanelView().setPage( 'page_settings' ).activateTab('settings');
} );
}
});
}
} );
elementor.settings.page.addChangeCallback( 'restar_header_builder_option', function ( newValue ) {
elementor.saver.update({
onSuccess: function() {
elementor.reloadPreview();
elementor.once( 'preview:loaded', function() {
elementor.getPanelView().setPage( 'page_settings' ).activateTab('settings');
} );
}
});
} );
elementor.settings.page.addChangeCallback( 'restar_footer_style', restarFooterStyle );
function restarFooterStyle ( newValue ) {
elementor.saver.update({
onSuccess: function() {
elementor.reloadPreview();
elementor.once( 'preview:loaded', function() {
elementor.getPanelView().setPage( 'page_settings' ).activateTab('settings');
} );
}
});
}
elementor.settings.page.addChangeCallback( 'restar_footer_choice', restarFooterChoice );
function restarFooterChoice ( newValue ) {
elementor.saver.update({
onSuccess: function() {
elementor.reloadPreview();
elementor.once( 'preview:loaded', function() {
elementor.getPanelView().setPage( 'page_settings' ).activateTab('settings');
} );
}
});
}
}
});
})(jQuery);