title: Retrieve row info of a dynamic table using Jquery when user clicks on it
body: <p>I am new to Jquery. I am learning the things one by one. my requirement is to create a dynamic jquery datatable.So I created in the following way:
  The variable <code>formattedCKEY</code> is a dynamic value that I am using for generating the table id's dynamically</p>
  
  <pre><code>var issueTableId = "issuetable_"+formattedCKEY;
  var $issuetable = $("
  &lt;table  id='" + issueTableId + "' class='stripe nowrap'  style='position:relative; top:0px; width:95%;'&gt;&lt;/table&gt;
  ");
  $issuetable.append('
  &lt;thead&gt;
     ').children('thead')
     .append('
     &lt;tr /&gt;
        ').children('tr')
        .append('
        &lt;th nowrap&gt;Select&lt;/th&gt;
        '+
        '
        &lt;th nowrap&gt;Priority&lt;/th&gt;
        ' +
        '
        &lt;th nowrap&gt;Issue ID&lt;/th&gt;
        ' +
        var $tbody = $issuetable.append('
  &lt;tbody /&gt;
     ').children('tbody');
     $.each(cases, function () {
     $tbody.append('
     &lt;tr /&gt;
        ').children('tr:last')
        .append('
        &lt;td nowrap&gt;&lt;input type="checkbox" /&gt;&amp;nbsp;&lt;/td&gt;
        ')
        .append('
        &lt;td nowrap&gt;' + $(this).find("PRTY").text() + '&lt;/td&gt;
        ')
        .append(sourceRow)
        .append('
        &lt;td nowrap&gt;' + $(this).find("ISSUEID").text() + '&lt;/td&gt;
        ');
        });
  </code></pre>
  
  <p>Here I am struggling with selecting the row information when the user click on that particular row. can anybody help me out how to do this when there are dynamic table id's?</p>
  
  <p>I have tried with following code so far:</p>
  
  <pre><code> //DataTables aplies style and behavior to &lt;table&gt;
   var table = $("#" + issueTableId).DataTable({
       "scrollY": 315, // inconsistent IE7/other
       "scrollX": true,
       "searching": false,
       "paging": false,
       "info": false
   });
  
   table.rows().every(function(rowIdx, tableLoop, rowLoop) {
       var row = this.row(rowIdx).node();
       // add contextMenu to each rows onclick
       $(row).click(displayResultslistPopup);
       // add onclick for each rows checkbox
       $(row).find('input:checkbox').click(function(event) {
           event.stopPropagation();
           $('#SAcheckBox').prop('checked', false);
       });
       // use presence of the attachmentImage.png to add jquery click event for td:
       $(row).find('td:has(img)').click(function(event) {
           event.stopPropagation();
           var id = $(this).parent().attr('id');
           issueAttachmentAttachmentLookUp(id);
       });
   });
  </code></pre>
  
  <p>But somehow <code>table.rows().every()</code> is not working for me. My intention is to register the click event on table row and retrieve the necessary row information.</p>