title: Set jQuery Modal Cookie to Expire in 7 days
body: <p>I need to make my jquery modal on the home page only that appears on page load to re-appear (onload) after 7 days.  Here is my current code and I'm confused on the date duration. I can;t figure out what to change.</p>
  <p>Here is my current code:</p>
  <pre><code>$(window).on('load',function(){
  if (document.cookie.indexOf('visited=true') == -1){
     
  $('#ex1').modal({show:true});
  var year = 1000*60*60*24*7;
  var expires = new Date((new Date()).valueOf() + year);
  document.cookie = &quot;visited=true;expires=&quot; + expires.toUTCString();
   }
  });
  </code></pre>