Compatibilty Question
-
Hi,
I hope you’re well ??
Is it possible to trigger hustle pop-ups via javascript?
It seems the wordpress theme “Laytheme” does not fire the hook Hustle is looking for, but maybe I can trigger the pop-ups manually using the custom newpageshown event that Laytheme provides?
Please see relevant documentation here: https://laytheme.com/documentation/custom-javascript.html
I looked for the event to call in the Hustle Documentation but I couldn’t find an answer. Is there an event I can call?
I’m thinking it may look as simple as something like below?<script>
window.laytheme.on("newpageshown", function() {
var pageId = $("body").attr("data-id");
if (pageId == "234") {
if (typeof Hustle !== 'undefined') {
Hustle.popups.show(popupID); // Replace with your actual Hustle popup ID
}
});
});
</script>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.