title: Cookie not being set in IE using Javascript
body: <p>I'm having trouble setting a cookie in IE 9/10/11 it works fine in Chrome/Firefox/Safari. I have tried things suggested in other questions on StackOverflow to no avail and have obviously checked the IE security settings.</p>
  
  <p>The cookie is being set with a simple function</p>
  
  <pre><code>function setCookie(name,value,expiredays) {
      if (expiredays &gt; 0) {
          var exdate = new Date();
          exdate.setDate(exdate.getDate()+expiredays);
          expires="; expires="+exdate.toUTCString();
      } else {
          expires="; expires=0";
      }
  
      document.cookie=name+"="+value+expires;
  }
  </code></pre>
  
  <p>and being called in one of two places (neither work)</p>
  
  <pre><code>jQuery.magnificPopup.open({
      callbacks: {
          close: function() {
              setCookie('seenSummer','summer',0);
          }
      },
      alignTop: true,
      items: [
          {
              src: '#summer-popup',
              type: 'inline'
          }
      ]
  });
  
  jQuery('.popup__btn').on('click', function() {
      setCookie('seenSummer','summer',0);
  });
  </code></pre>