jQuery: Using the attr with custom attributes
<p>Right now I'm doing various invalid things like:</p>

<pre><code>&lt;span time="50" distance="60"&gt;&lt;/span&gt;
</code></pre>

<p>And then grabbing that info with:</p>

<pre><code>var time = $('span').attr('time');
var distance = $('span').attr('distance');
</code></pre>

<p>And then doing various things with the time and distance in jS/jQuery.</p>

<p>To me, this feels wrong. It's insemantic, but I really can't care less about that (actual data is not time and distance but something quite worthless and page specific, nothing that SEs are interested in). But is there some other reason why this is a bad idea?</p>

<p>I know there's a metadata plugin which does something similar in a more 'official' way, and I thought about using it. But this .attr stuff is suitable for my needs and I don't see any compelling reason to use the plugin.</p>

<p>So basically, is this a decent pattern to use, and if not, why not, and should I be interested in the metadata plugin.</p>

<p>Thanks.</p>
