title: Bootstrap modal and cookie
body: <p>I have created a bootstrap modal popup and it appears and disappears perfectly. What I need to do is check to see if there is a cookie stored and only have the popup appear once while the user is on the site. I have a close button on it too. At the moment it appears every time I refresh the page and I'm not sure how to get it to work. I have seen a couple of examples by googling but nothing works for me. Can anyone help? Thanks </p>
  
  <p>Here is my Javascript:</p>
  
  <pre><code>$(document).ready(function () {
      if (document.cookie != "") {
          $("#myModal").modal("show");
          $("#myModalClose").click(function () {
            $("#myModal").modal("hide");
          });
      }
  });
  </code></pre>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;div id="myModal" class="modal fade in"&gt;
      &lt;div class="inner-modal"&gt;
          &lt;div class="modal-container"&gt;
              &lt;p&gt;some text&lt;/p&gt;
              &lt;button class="close" data-dismiss="modal" data-target="#myModal"&gt;Hide this message&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;  
  &lt;/div&gt;
  </code></pre>