title: Adding click events to Datatables
body: <p>Here is my Jquery data tables to get the values from ajax and placing it.</p>
  
  <pre><code>$(document).ready(function() {
      $('#example').DataTable({
          "ajax": "data/arrays.txt"
      });
  });
  </code></pre>
  
  <p>Here is the constructed table. </p>
  
  <p>I want to write click function to it. How can i do it ? </p>
  
  <pre><code>&lt;table id="example" class="table dataTable no-footer" role="grid" aria-describedby="example_info" style="width: 299px;"&gt;
      &lt;tbody&gt;
          &lt;tr role="row" class="odd"&gt;
              &lt;td class="sorting_1"&gt;TMB030&lt;/td&gt;
              &lt;td&gt;Sample Collected&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr role="row" class="even"&gt;
              &lt;td class="sorting_1"&gt;TMB033&lt;/td&gt;
              &lt;td&gt;Sample Collected&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I want to write click event to the role="row" and get the value <code>TMB030</code> on it. </p>
  
  <p>How can i do that ?</p>
  
  <p>I tried like this</p>
  
  <pre><code>$(document).ready(function() {
      $('#example').DataTable({
          "ajax": "myOrders/" + Cookies.get('userSession')
      });
      $("div[role='row']").click(function() {
          alert('clicked')
      });
  });
  </code></pre>
  
  <p>But it is not triggered how can i do that ? Help pls</p>