title: How to set a cookie in jquery using toggle()
body: <p>Looking for a cookie to be set when the user clicks on the link it'll open the div then the user can refresh the page and see the div is still open.</p>
  
  <p>=======HTML=======</p>
  
  <pre><code>&lt;a class="show-settings" href="#"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>========jQuery=======</p>
  
  <pre><code>$(function () {
  //Toggle Settings
  var s = $("a.show-settings"); 
  
  //On click to toggle settings
  s.click(function () {
      $("#s4-ribbonrow, #s4-titlerow").toggle();
  });
  //Add/Remove text
  s.toggle(function () {
      //$(this).text("Hide Settings");
  }, function () {
      //$(this).text("Show Settings");
  });
  </code></pre>