is anybody here using Elementor? How do you trigger the Popup via code? For example.
function popup_call(){
...
if(....){
//trigger the popup here...
}
}
This question has already been answered:
// accessible on window.elementorProFrontend
elementorProFrontend.modules.popup.showPopup( { id: 123 } );
https://github.com/elementor/elementor/issues/7077#issuecomment-595570337
or try to bind your popup to a button, hide the button with css
.yourbtn {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
and use click with js (jquery)
$('.yourbtn').click();
If the second method helps you, do not forget to hide the button from screen readers aria-hidden="true" and tabindex="-1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With