title: How do you use jQuery .data() to store html?
body: <p>when I look up the syntax for .data(), it gives examples like this:</p>
  
  <pre><code>$('body').data('foo', 52);
  </code></pre>
  
  <p>I am doing AJAX loads and I was wondering if it is possible to store the incoming html using .data() so once the content is loaded, I would not need to do another AJAX load if the same link is clicked again - I would check to see if the .data key is empty.</p>
  
  <p>Would something like this work?:</p>
  
  <p>To load the contents of a #ajaxdiv into storage:</p>
  
  <pre><code>$('body').data('storage', div#ajaxdiv.html());
  </code></pre>
  
  <p>To test if the data has already been loaded:</p>
  
  <pre><code>if $('body').data('storage') != '' {
  
  div#ajaxdiv.html($('body').data('storage'));
  
  }
  </code></pre>
  
  <p>Thanks in advance!!</p>
  
  <p>Al</p>