 <p>Each time you click, you call this function.</p> <pre><code>function tableClick(event){ $('#table').click(function(event){ alert(event.target.id); }); } </code></pre> <p>This part:</p> <pre><code>$('#table').click(function(event){ </code></pre> <p>attaches a click handler to the table. <strong>Every time you click</strong> you attach a new click handler to the table.</p>