Auto trigger of popup

I am using https://wordpress.org/plugins/popup-anything-on-click/ for pop up. This plugin basically provides you two options to trigger the popup, one is through the link and the other is through the button.

I want to trigger the popup automatically when a page is loaded, no need to click button or link. Assitance required

Regards

1 Answer

Well the plugins itself says it open on click. I sometime use this trick, and that also help you too.

You have to trigger click on page laod. Suppose your button/link selector is class named “clickmetoopen” I write it like

$(document).ready(function(){
    $(".clickmetoopen").trigger("click");  
});

Or if your selector is id something like “clickmetoopen” the above code should be work for you like

$(document).ready(function(){
    $("#clickmetoopen").trigger("click");  
});

Archive from: https://wordpress.stackexchange.com/questions/353577/auto-trigger-of-popup

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *