title: Adding +1 to a cookie value on click of a div
body: <p>On first page load a cookie is set and has a value of 0.</p>
  
  <p>Basically each time a <code>div</code> is clicked the person (this is only for guests) earns 1 EXP, so I need to change the cookie value each time the <code>div</code> is clicked by +1. The page won't be refreshed so it needs to store the cookie and show it live, i.e. "You have earned 50 EXP", then click, "You have earned 51 EXP" without a refresh. However the value also needs to stay put if they refresh too.</p>
  
  <p>I found some code on stackoverflow but I'm not sure how to relate it:</p>
  
  <pre><code>$(document).ready(function(){
  
      //set exp cookie
      setCookie("exp", '0');
  
      //getting the value of exp cookie and assigning it to a variable
      var expCookieCount = getCookie("exp");
  
      $("#div").one("click",function(){
  
          expCookieCount++;
  
          //set the incremented value of expCookieCount variable to exp cookie
          setCookie("exp",expCookieCount);
  
          // assigning the value of expCookiecount to variable 123
          var 123 = getCookie("exp");
  
      });
  
  });
  </code></pre>