-4

This is the current script I am running to load a popup once every 15 days. Please tell me How to alter the code.

$(window).load(function() {
  if (document.cookie.indexOf('visited=true') === -5) {
    var fifteenDays = 1000*60*60*24*15;
    var expires = new Date((new Date()).valueOf() + fifteenDays);
    document.cookie = "visited=true;expires=" + expires.toUTCString();
    $("#overlay").fadeTo(1000, .8);
    $(".playerWindow").show(750);
  }
});
</script>

1 Answers1

1
var fifteenDays = 1000*60*60*24; // This will be 1 day
Eli
  • 14,779
  • 5
  • 59
  • 77