title: Saving Cookies To A Javascript Associative Array
body: <p>I'm having trouble with cookies. I have a bunch of links that when clicked on, create a cookie. For each link I need to be able to save that cookie to an associative array. The tricky part is the cookie values are dynamically created. We don't know what they are until they are clicked on (using the id attribute).</p>
  
  <p>Here is the click function I'm using to create the cookie:</p>
  
  <p>$j('a.createCookie').click(function(e) {</p>
  
  <pre><code> var cookieName = "InsightsCookie";
  
   var cookieValue = $j(this).attr("id");
  
   $j.cookie(cookieName, cookieValue, {expires: 365, path: '/'});     
  </code></pre>
  
  <p>});</p>
  
  <p>Any help would be much appreciated.</p>