title: Get ID of TD on click of table
body: <p>I have a jQuery function where,when the table is clicked, I need to know the ID of the table cell that was clicked. Here is my <a href="https://jsfiddle.net/x7czw6au/1/" rel="nofollow noreferrer"> JS Fiddle. </a> And here is my jQuery:</p>
  
  <pre><code>$(document).on("click", "#board", function(e) {
      var data = $(this).find('td').attr('id');
      alert (data);
  }); 
  </code></pre>
  
  <p>Even though this is giving me an ID, it keeps giving me the ID of the first cell. How do I fix this?</p>
  
  <p>Thanks</p>