Skip to content

Instantly share code, notes, and snippets.

@julian-stark
Last active June 28, 2020 07:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save julian-stark/5516c5380fc9eacddd96744136dc607a to your computer and use it in GitHub Desktop.
Elementor page builder: Close current popup and open new popup
jQuery( document ).ready( function( $ ) {
// Let's assume the trigger is a link in div with ID #new-popup-trigger
$( "#new-popup-trigger a" ).click(function() {
// Replace XXX1 with the post id of the current popup
$( "#elementor-popup-modal-XXX1 .dialog-close-button" ).click();
// Replace XXX2 with the post id of the new popup
elementorProFrontend.modules.popup.showPopup( { id: XXX2 } );
});
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment