Using JQuery/JS to store the id of a <td> on click()
<p>I have a table with a bunch of data. Each <code>&lt;td&gt;</code> contains <code>class="person"</code> and <code>id=0,1,2,3, etc.</code> based on <code>$i</code> (I'm using a loop to build my table from an array).</p>

<p>I'd like it so that whenever a person (<code>&lt;td&gt;</code>) is clicked, that cell gets highlighted with some css.</p>

<p>So far I think I can use this:</p>

<blockquote>
  <p>$('.person').click(function(){</p>

<pre><code>$id = some function to which attr('id') was selected???;
$('id').addClass("highlights");
</code></pre>
  
  <p>});</p>
</blockquote>

<p>Does anyone know how I can fetch the ID of the cell being clicked? Any help or approaches appreciated.</p>

<p>Thanks!</p>
