title: How to delete current row with jquery datatable plugin with multiple tables in the page
body: <p>I use datatable plugin in a website.
  Normally I have only 1 datatable per page but in a special display I have 2 datable.</p>
  
  <p><strong>Actually I have this code</strong></p>
  
  <pre><code>var oTable = $('.datatable').dataTable({
      'sPaginationType':'full_numbers',
      "iDisplayLength": 50,
      "oLanguage": {
          "sUrl": "js/locales/dataTables.french.txt"
      }
  });
  
  /* Add a click handler to the rows - this could be used as a callback */
  $(".delete-ajax").click(function(event) {
      event.preventDefault();
      var answer = confirm("Supprimer l'élément ?")
      if (answer){
      var loading = $('.loading-notification');
      loading.removeClass('hidden');
          $(oTable.fnSettings().aoData).each(function (){
              $(this.nTr).removeClass('row_selected');
          });
          $(event.target).parents('tr').addClass('row_selected');
          var url = $(this).attr('href');
          var id = $(this).attr('data-ajax');
          var anSelected = fnGetSelected( oTable );
          $.ajax({
              type: "POST",
              url: url,
          data: "delete=true&amp;id="+ id,
          async : true,
          success: function(msg) {
              loading.addClass('hidden');
              oTable.fnDeleteRow( anSelected[0] );
              }
          });
      }
  });
  /* Get the rows which are currently selected */
  function fnGetSelected( oTableLocal ){
      var aReturn = new Array();
  var aTrs = oTableLocal.fnGetNodes();
  for ( var i=0 ; i&lt;aTrs.length ; i++ ){
      if ( $(aTrs[i]).hasClass('row_selected') ){
          aReturn.push( aTrs[i] );
      }
  }
  return aReturn;
  }
  </code></pre>
  
  <p>This code work well when I have only 1 datatable but when I have more I obtain In my console :</p>
  
  <pre><code>k is undefined
  [Stopper sur une erreur]   h=a._iDisplayEnd;if(a.oFeatures.bServe...push(a.aoOpenRows[k].nTr)}}else{d[0]= 
  </code></pre>
  
  <p>Any idea on how to solve this problem ? </p>