• Resolved tnkaoua

    (@tnkaoua)


    Hi

    Auto close does not work for me.

    I use the snippet from

    https://docs.wppopupmaker.com/article/93-automatically-close-popup-after-10-seconds

    Test link <a href=# class="popmake-174660">Test</a>

    with the snippet

    add_action( 'wp_footer', 'my_custom_popup_scripts', 500 );
    /**
     * Add a script to automatically close a popup after X seconds.
     *
     * @since 1.0.0
     *
     * @return void
     */
    function my_custom_popup_scripts() { ?>
        <script type="text/javascript">
            (function ($, document, undefined) {
    
                $('#pum-174660)
                    .on('pumAfterOpen', function () {
                        var $popup = $(this);
                        setTimeout(function () {
                            $popup.popmake('close');
                        }, 100); // 10 Seconds
                    });
    
            }(jQuery, document))
        </script><?php
    }
    

    Thanks
    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Auto close not working’ is closed to new replies.