Accessing td inside of div for editing

Accessing td inside of div for editing

I need to provide users ability to edit within table using double click. For this I have the following code:

  1.   $(function() {
        $("table td").dblclick(function() {
       var OriginalContent = $(this).text();
       $(this).addClass("cellEditing");
       $(this).html("<input type='text' value='" + OriginalContent + "' />");
       $(this).children().first().focus();
       $(this).children().first().keypress(function(e) {
         if (e.which == 13) {
        var newContent = $(this).val();
        $(this).parent().text(newContent);
        $(this).parent().removeClass("cellEditing");
         }
       });
       $(this).children().first().blur(function() {
         $(this).parent().text(OriginalContent);
         $(this).parent().removeClass("cellEditing");
       });
       $(this).find('input').dblclick(function(e) {
         e.stopPropagation();
       });
        });
      });


I create a table within div as follows: "MDTABLE" is id of div:

     $("#MDTABLE").html(''.concat(
      '<table style="text-align: center; background-color: white"">',
      '<tr>',
      '<th>MONDAY</th>',
      '<th>TUESDAY</th>',
      '<th>WEDNESDAY</th>',
      '<th>THURSDAY</th>',
      '<th>FRIDAY</th>',
      '<th>ENSURE</th>',
      '</tr>',
      '<tr>',
      '<td>'+ meminfo.MON +'</td>',
      '<td>'+ meminfo.TUE +'</td>',
      '<td>'+ meminfo.WED +'</td>',
      '<td>'+ meminfo.THU +'</td>',
      '<td>'+ meminfo.FRI +'</td>',
      '<td>'+ meminfo.ENS +'</td>',
      '</tr>',
      '</table>' 
     ));


The problem is that the function is not triggered when the table is contained within a div. Works great when not in div.

Obviously I do not have the correct syntax to access the td. I've tried a number of combos but not h it  upon the correct one y et.