• Resolved dev5

    (@dev5)


    Hi,

    There’s a simple redirect script being used in a Popups for Divi popup, but it doesn’t work. It works perfectly in a test page with no popup.

    The script is a redirect to another page and has a counter that counts down to zero, then executes the redirect. The counter doesn’t count. It stays frozen at 9 seconds.

    Code is below.

    <!-- Modify according to your requirements -->
    
    <h3>
    Redirecting to duckdev.com after <span id="countdown">10</span> seconds
    </h3>
    <!-- JavaScript part -->
    <script type="text/javascript">

    // Total seconds to wait
    var seconds = 10;

    function countdown() {
    seconds = seconds - 1;
    if (seconds < 0) {
    // Chnage your redirection link here
    window.location = "https://duckdev.com";
    } else {
    // Update remaining seconds
    document.getElementById("countdown").innerHTML = seconds;
    // Count down using javascript
    window.setTimeout("countdown()", 1000);
    }
    }

    // Run countdown function
    countdown();

    </script>

    To test the problem, got to https://new.kenlonyai.com/home-2/ and select the slide that is 3rd from last and tap a “Listen” button.

    Any idea why this is? Does a hidden section disable JS?

    Thank you!

    • This topic was modified 3 months, 4 weeks ago by dev5.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Divimode

    (@divimode)

    Hello, sorry about the long wait on this ticket. It sounds like there is a Javascript conflict. The custom Javascript will likely need to be tweaked to be compatible inside of a popup. It can definitely be done, but will require custom work, which I’m afraid we are unable to provide.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.