how jQuery $.data() method differs from directly attaching variables to DOM elements?
<p>I can do this:</p>

<pre><code>$('#someid').data('dataIdentifier', 'someVariable');
</code></pre>

<p>And in my understanding I can do this:</p>

<pre><code>document.getElementById('someid').dataIdentifier = someVariable;
</code></pre>

<p>What are the pros of using jQuery for this versus raw javascript?</p>

<p>Thanks!</p>
