What is the recommended practice to send information from the server to a jQuery script?
<p>At the moment my server outputs HTML that looks something like this:</p>

<pre><code>&lt;span class='tag'&gt;music&lt;a href='' onclick='return remove_tag(73)'&gt;×&lt;/a&gt;&lt;/span&gt;
&lt;span class='tag'&gt;concert&lt;a href='' onclick='return remove_tag(42)'&gt;×&lt;/a&gt;&lt;/span&gt;
&lt;span class='tag'&gt;theatre&lt;a href='' onclick='return remove_tag(101)'&gt;×&lt;/a&gt;&lt;/span&gt;
</code></pre>

<p>Of course, the numbers in the JavaScript are database IDs which the server understands.</p>

<p>Now, I’m told that it is not good practice anymore to put JavaScript onclick handlers into the HTML, but instead to bind them in jQuery:</p>

<pre><code>&lt;span class='tag'&gt;music&lt;a href=''&gt;×&lt;/a&gt;&lt;/span&gt;
&lt;span class='tag'&gt;concert&lt;a href=''&gt;×&lt;/a&gt;&lt;/span&gt;
&lt;span class='tag'&gt;theatre&lt;a href=''&gt;×&lt;/a&gt;&lt;/span&gt;

[...]

$(".tag a").click(function() { return remove_tag( ??? ); })
</code></pre>

<p>But now where do I put those IDs for each tag? What is the recommended practice for this?</p>
