jQuery selector is not working for Ajax

jQuery selector is not working for Ajax

I have added <Table> dynamically to my page. No selector for this added table is not working.
 
JSP Code
===============

<div id="empData">
 <table id='empDataTbl' border='1'>
 </table>
</div>



JAVAand jQuery code to populate Table

  1. $('#search').click(function () {
        var empId = $('#empId').val();
        var empFName = $('#empFName').val();
        var empLName = $('#empLName').val();
        var empDob = $('#dob').val();
        var data = 'empId='+empId+'&empFName='+empFName+'&empLName='+empLName+'&dob='+empDob;
        $.ajax({
        type:"POST",
        url:"searchemployee.do?method=search",
        data: data,
        success: function (html) {
         $('#empDataTbl').html(html);
        }
       });
       
       return false;
       });















  1. private

    String generateEmpDetailsHtml(List<Employee> empData){

    StringBuilder empDataHtml =

    new StringBuilder();

    //empDataHtml.append("<table id='empDataTbl' border='1'>");

    empDataHtml.append(

    "<tr>");

    empDataHtml.append(

    "<th> Employee Id</th>");

    empDataHtml.append(

    "<th> First Name</th>");

    empDataHtml.append(

    "<th> Last Name</th>");

    empDataHtml.append(

    "<th> DOB </th>");

    empDataHtml.append(

    "</tr>");

    for(Employee emp : empData){

    empDataHtml.append(

    "<TR>");

    empDataHtml.append(

    "<TD>").append(emp.getEmpId()).append("</TD>");

    empDataHtml.append(

    "<TD>").append(emp.getEmpFname()).append("</TD>");

    empDataHtml.append(

    "<TD>").append(emp.getEmpLName()).append("</TD>");

    empDataHtml.append(

    "<TD>").append(emp.getDob()).append("</TD>");

    empDataHtml.append(

    "</TR>");

    }

    //empDataHtml.append("</table>");

    return empDataHtml.toString();

    }

jQuery selector code (I have tried both of them but not worked)

  1. $

    ('#empDataTbl').find('TR').dblclick(function() {

    alert(

    'Here');

    $(

    this).remove();

    return false;

    });

  1. $

    ('#empDataTbl TR').dblclick(function() {

    alert(

    'Here');

    $(

    this).remove();

    return false;

    });