Home › Forums › WoodMart support forum › Popup triggers
Popup triggers
- This topic has 3 replies, 2 voices, and was last updated 1 day, 7 hours ago by
Artem Temos.
-
AuthorPosts
-
October 16, 2025 at 2:49 pm #691293
la.xtemos.accParticipantHello!
We are testing now the new popups (https://xtemos.com/docs-topic/popup-builder/) and would like to know how to trigger those popups on a button click?
We have a custom code for the elementors popups via Dashboard -> Templates -> Popups (see attached file)
But since popups that are created using Dashboard -> Popups belong to wd_popups and not pure elementor popups, there should be a method of the theme how to trigger the popups properly.Could you please advise how to correctly trigger those type of the popups to appear on the button click?
October 16, 2025 at 2:50 pm #691294
la.xtemos.accParticipantHere is the .js custom code
October 16, 2025 at 2:51 pm #691296
la.xtemos.accParticipantHere is the custom code used for Elementor popups
jQuery(window).on(‘elementor/frontend/init’, function () {
var button = document.querySelector(‘.contactformpopuptest’);
if (button) {
button.addEventListener(‘click’, function (e) {
e.preventDefault();if (
typeof elementorProFrontend !== ‘undefined’ &&
elementorProFrontend.modules &&
typeof elementorProFrontend.modules.popup !== ‘undefined’
) {
console.log(‘Popup module loaded:’, elementorProFrontend.modules.popup);
try {
elementorProFrontend.modules.popup.showPopup({ id: 29063 }); // ID of the elementor popup
} catch (err) {
console.error(‘Popup failed to open:’, err);
}
} else {
console.warn(‘Popup module is not available. Make sure Elementor Pro is active and the popup is published.’);
}
});
}
});-
This reply was modified 1 day, 8 hours ago by
la.xtemos.acc.
October 16, 2025 at 4:33 pm #691352
Artem TemosKeymasterHello,
To trigger the pop-up when you click on a specific button, you don’t need to use custom JavaScript code. Simply remove the code and use the “On selector click” trigger as shown in the screenshot https://gyazo.com/bd73ac3b12aee6185ba18c93d5a77ecc
In this case, your button should have a CSS class ofmy-custom-button
.Kind Regards
-
This reply was modified 1 day, 8 hours ago by
-
AuthorPosts
Tagged: popups
- You must be logged in to create new topics. Login / Register