How can I store a value (string) in a web page
<p>I would like to store the value of something on my web page for later use by
some javascript functions. I thought of doing something like this where I have
a div with an id of CategoryID and then put the value in that as HTML. </p>

<pre><code>   &lt;div id="CategoryID"&gt;&lt;/div&gt;

   $('#categories &gt; li &gt; a').click(function (e) {
      e.preventDefault();
      $('#CategoryID').html = $(this).attr('data-value')
      refreshGrid('Reference');
   });
</code></pre>

<p>Then later inside functions such as refreshGrid (and some other functions), I could get the value like this:</p>

<pre><code>   var categoryID = $('#CategoryID').val();
</code></pre>

<p>Does this seem like a good way to store a temporary variable? How about with 
HTML5, is there some way to store values without having to put them inside a 
div or something like that. All I need is to have a value that is stored in some
way on the page.</p>

<p>One more question. If I store the value is this the correct way to do it:</p>

<pre><code>$('#CategoryID').html = $(this).attr('data-value')
</code></pre>
