Delaying the lightbox pop up

  • Profile Image
    rock1113
    Asked on February 05, 2015 at 11:48 AM
  • Profile Image
    Jan
    Answered on February 05, 2015 at 01:04 PM

    Hi,

    Are you referring to the lightbox form? If yes, then that is possible.

    Actually, we already have a guide for that. Please check this guide on How to Auto-popup a Lightbox Form. Please refer to section B. It indicates that you need to get the lightbox embed code first, then add id="lightboxdelay" inside the anchor tag. After that, you need to add this script below the lightbox embed code.

    <script language="JavaScript">

    var delayseconds = 5;

        function pause() {

        myTimer = setTimeout('whatToDo()', delayseconds * 1000)

        }

       function whatToDo() {

    document.getElementById('lightboxdelay').click();

        }

    window.onload = pause;

    </script>

    The value 5 means 5 seconds before it pop ups.

     

    Hope this helps. Thank you!