Popup icon indicating copy to clipboard operation
Popup copied to clipboard

Set a time before showing a popup

Open HartLarsson opened this issue 8 years ago • 0 comments

I've tried this solution:

            var popup = new $.Popup();
            if ($.cookie('responsive_popup') == null) {
                var myVar = setTimeout(function(){ popup.open('#inline'); }, 3000);
                
            }
            $(".popup_close").click(function(){
                clearTimeout(myVar);
                $.cookie('responsive_popup', 'yes', { expires: {/literal}{$popup_cookie*0.000694}{literal}, path: '/' });
            });

The onkly problem is when i click the X to close the popup with setTimeout used, the cookie is not saved. If i remove the setTimeout function and return to the normal way is working.

Is very strange! There is a fix?

HartLarsson avatar Nov 07 '17 14:11 HartLarsson