Support » Plugin: Popups for Divi » Automatic trigger

  • enigmothy

    (@enigmothy)


    Is there a way to create an automatic trigger with this plugin, so that when someone accesses the homepage, the popup comes up automatically without clicking on a link/button (like 1 second after going to the page)?

Viewing 1 replies (of 1 total)
  • Lacko123

    (@lacko123)

    Hi, yes you can. If I remember correctly there is an article on the author’s website. But I can’t find it right now. So I’m showing my own saved script. Displays a pop-up window after 5 seconds.

    <script>
    window.setTimeout(function(){ 
        DiviPopup.openPopup('#get-newsletter') 
    }, 5000); 
    </script>

    Displays a pop-up window after 200 Pixels scrolling.

    <script>
    jQuery(window).on('scroll.popup', function() {
      if (jQuery(window).scrollTop() >= 200) {
        jQuery(window).off('.popup');
        DiviPopup.openPopup('#get-newsletter');
      }
    });
    </script>

    Put the required script into a code module within the popup section. Instead of (“# get-newsletter”) enter your ID here.

Viewing 1 replies (of 1 total)
  • The topic ‘Automatic trigger’ is closed to new replies.