Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Popup Maker - Set 30-day cookie for terms agreement popup
@danieliser

This comment has been minimized.

Copy link

@danieliser danieliser commented Jun 11, 2021

Might need to wrap the PUM.open() parts within document.ready. I believe jQuery v3 now does it like this:

jQuery(function () {
    // doc.ready
});
@marklchaves

This comment has been minimized.

Copy link
Owner Author

@marklchaves marklchaves commented Jun 16, 2021

Thanks, @danieliser!

I've updated the syntax. I also refactored the code to take in the first and second popup IDs via data attributes (rather than hardcoding them). The code has been tested and is running on https://streetphotography.blog/test-terms-with-opt-in/

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