0

I am wondering if how can I set the cookie of a modal pop-up to expire every 1 minute.

Here's the code I have:

var MineKwait = "Mon, 07 Dec 2017 01:51:00 UTC"

if (getCookie("underme")) {
  $("#book-cover")
    .remove()
}
focus()
var listener = addEventListener('blur', function() {
  if (document.activeElement === document.getElementById('book-frame')) {
    // clicked
    document.cookie = "underme=true; expires=" + MineKwait;
    setTimeout(function() {
      $("#book-cover").remove();
    }, 500);

  }
})
Tyler Roper
  • 21,445
  • 6
  • 33
  • 56
Joseph
  • 1

0 Answers0