title: Using a cookie to show a Div for first time site visitors
body: <p>I am attempting to show a div (<code>#home-landing</code>) on the home page of a site for the initial visit to the website. For all subsequent visits to the home page during the same session I would like <code>#home-landing</code> to be set to <code>display:none;</code>.</p>
  
  <p>I found some code on stackoverflow for hiding a div after the first 5 visits of a visitor, but it is spread out across different sessions.</p>
  
  <pre><code>if (!$.cookie('visits')) {
    $.cookie('visits', 1, {
      expires: 30
    });
  }
  $.cookie('visits', (parseInt($.cookie('visits')) + 1), {
    expires: 30
  })
  //will expire after 30 days
  var overlayContact = function () {
    if (parseInt($.cookie('visits')) &lt; 5) {
      $('#home-landing').show();
    }
  };
  setTimeout(overlayContact, 180000);
  });
  </code></pre>
  
  <p>How would I write the code so that this could be accomplished?</p>