Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Last active February 1, 2019 05:53
Show Gist options
  • Save carlosonweb/151bc21c44d0aa1c316831da81862ae7 to your computer and use it in GitHub Desktop.
Save carlosonweb/151bc21c44d0aa1c316831da81862ae7 to your computer and use it in GitHub Desktop.
Using JavaScript to test if Beaver Builder Page Editor is active on a page or layout. This is useful if you to run a JavaScript Code on live page and not run it inside the Page Builder Editor --- or vice-versa, of course. :-)
jQuery(document).ready(function($){
if( typeof window.FLBuilderConfig === 'undefined' || window.FLBuilderConfig === null ) {
// You are on a live page!
// Rest of the code here;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment