Last active
June 28, 2020 07:58
-
-
Save julian-stark/5516c5380fc9eacddd96744136dc607a to your computer and use it in GitHub Desktop.
Elementor page builder: Close current popup and open new popup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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