Skip to content

Set a time before showing a popup #28

Description

@HartLarsson

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions