Don't get value when refreshing the page in jquery
<p>When I click on link the value displayed correctly.But when I refresh the page i don't get this value.</p>

<p>I have written below code</p>

<pre><code>$j("#add_to_cart_action").click(function(e) {
      $j.em.cart.addSelectedTitle();
    });

$j.em.cart.addSelectedTitle = function() {
  var addcartitemindx = $j("body").data("selected_title").product_id;
  var indx = $j("body").data("selected_title").cindex;
  var addcartitemtitle = $j("body").data("selected_title").ctitle;
  if ($j('input#chkout_'+addcartitemindx).length &gt; 0) {
    alert('Shopping Cart Notification:\n "'+addcartitemtitle+'" is already added.');
    return false;
  }

 $j('#checkout_form ul').prepend('&lt;li&gt;&lt;input checked="true" type="checkbox" id="chkout_'+addcartitemindx+'" name="product[]" class="added-item" value="'+addcartitemindx+'"/&gt;&lt;a href="javascript:$j.em.cart.TriggerCartItem('+indx+');"&gt;'+addcartitemtitle+'&lt;/a&gt;&lt;/li&gt;');
  $j.em.cart.setCartDisplay();
};
</code></pre>

<p>I want to store addcartitemtitle in cookie so that i can restore so please give me the syntax to write it in jquery.</p>
