passing custom data from <a> to jQuery to show confirmation message before delete
<p>How can I pass custom data to the jQuery event handler, specifically from the <code>$(this)</code> element? In HTML5, I probably can legally write:</p>

<p><code>&lt;a class="delete" href="delete.php?id=5" data-id="5"&gt;delete&lt;/a&gt;</code></p>

<p>although I still feel a bit awkard about that. How about prior to that?</p>

<pre><code>$(".delete").click(function() {
   return confirm("Do you really want to delete " + $(this).attr("data-id"));
});
</code></pre>

<p>Any best practices?</p>
