I need a small script that allows me to do the following in an Elementor page builder and Wordpress site:
Have a button element that is in a pop-up do 3 things when clicked -> (1) open a link in a new window, (2) close the current pop-up and (3) open a different pop-up. The script should be written in a way I can duplicate it for a few different buttons.
The button currently opens a link in a new window. The functionality that needs to be added is to have the button close the current pop-up and open a different pop-up that is created in Elemetor pop-up builder.
I should be able to embed the code in the relevant file in Elementor to get the required functionality.