title: How Can I Set a Cookie on Click?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/260749/what-is-the-best-way-to-get-and-set-a-single-cookie-value-using-javascript">What is the “best” way to get and set a single cookie value using JavaScript</a>  </p>
  </blockquote>
  
  
  
  <p>I made a notification bar which you can see at the top of the site.  There is a p tag with the text "close x" in it which when clicked will add a class to the container using jquery and hide the bar.  What I am trying to do though is create a cookie for the user when they click this so that the choice to hide the bar is saved until they end their session on the site.</p>
  
  <p>I really don't know much about setting up cookies, any ideas?</p>
  
  <p>Here is the live version to see: <a href="http://www.brainbuzzmedia.com/themes/simplybusiness/" rel="nofollow noreferrer">http://www.brainbuzzmedia.com/themes/simplybusiness/</a></p>