replaceWith but permanent - another way to store
<p>I have a div which I update with a count of contents of a shopping cart - when a user adds to the cart, i count the number of lines, then update the div to say e.g. 2 Lines</p>

<p>I currently use:</p>

<pre><code>&lt;script type="text/javaScript"&gt;
$(document).ready(function(){
$("#lines2").replaceWith($('#lines').html());
});
&lt;/script&gt;
</code></pre>

<p>I use replace with as I say "0 Items" at the start of a user session.</p>

<p>All works great apart from when user leaves the cart page, the div then changes back to 0 Items - is there a way to rewrite a div more permanently?</p>

<p>I know its a hack but its a favour for a favour thingy!</p>
