Jquery dynamically create link
<p>I have a piece of JQuery that creates a row in a table and in one of the cells there is an X that is surrounded by a class. When it is dynamically created and then clicked on the click listener does not fire.
Here is the code.</p>

<pre><code>$('#add').click(function() {
   $( '#table' ).append('&lt;td class="x"&gt;X&lt;/td&gt;&lt;/tr&gt;');
});
$('.x').click(function() {
  alert('Fired');
});
</code></pre>
