danieliser
6/4/2016 - 7:19 PM

Simle jQuery to show a popup at 3rd page of a visitor - Wordpress Popup Maker

Simle jQuery to show a popup at 3rd page of a visitor - Wordpress Popup Maker

jQuery(document).ready(function ($) {
        {
            var visited = Cookies.get('visited');
            if (visited == undefined) {
                Cookies.set('visited', 0, {path: '/'});
            }
            else if (visited < 2) {
                Cookies.set('visited', ++visited, {path: '/'});
            }
            else if (visited == 2) {

                setTimeout(function () {
                    $(".popmake-17158").trigger("click");
                }, 3000);

                Cookies.set('visited', ++visited, {expires: 30, path: '/'});

            }