 <p>The reason the double click event doesn't work on newly added rows is because you are binding the click event before the elements exist. Try binding with this style (event delegation is the term):</p> <pre><code>$("#datatable").on("dblclick", "td", function() { //do stuff }); </code></pre> <p>As per adding a <code>tbody</code> when one is not present, simply do a check to see if one exists:</p> <pre><code>if ($("#datatable tbody").length) { //it exists! } else { //it doesnt exist! } </code></pre>