Help with timer in Datatables

1

In a column of the datatable, the time is set, if this time becomes a chronometer, the problem is that the first value that only finds that one repeats in the other cells of the column, for example the time in cell 1 It's 09:25:45 and if I activate the chronometer in the other cells it shows me this first value in all those cells, how can I show the value independently in each cell, then I expose my code (my time column is the 3 and the column that activates the stopwatch is 8):

$('#procestables').dataTable(
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
    ///extrayendo hora minutos y segundos
    devhor=devuelvehora(aData[3]);
    devmin=devuelveminuto(aData[3]);
    devseg=devuelvesegundo(aData[3]);

      if(aData[8]=="f") {
          //activando el cronometro en funcion a la hora minuto y segundo recuperado de la celda
           setInterval( function () {
              devseg=devseg+1;
                 if(devseg>=60){
                  devseg=0;
                  devmin=devmin+1;
                  }
                 if(devmin>=60)
                 {devmin=0;
                  devhor=devhor+1;
               }
      //aqui retornamos el valor en el datatable del ahora minuto y segundo 
                $('td:eq(3)', nRow).html("<h4 style='color:#000000'>"+devhor+":"+devmin+":"+devseg+"</h4>" );
      },1000 );
  }
 else
  { //si es falso no se activa el cronometro
      $('td:eq(3)', nRow).html("<h4           style='color:#000000'>"+devhor+":"+devmin+":"+devseg+"</h4>");
  }       
});
    
asked by SergioDen Almendras 03.10.2016 в 17:24
source

0 answers