Retrieve responsive datatable data

1

I'm using datatables to show information and the last column I have a button with actions (Edit, delete..etc)

In this case, the edit button for example has the following code:

 <a href="#" data-toggle="modal" data-target="#mdlEditPressTask" class="edit">
      <i class="fa fa-pencil-square-o" aria-hidden="true"></i> 
      Editar
</a>

I have:

  

var table = $ ("# table-tasks"). DataTable ({...});

To recover the data I do the following:

 //EDIT DATA TASK  MODAL
    $("#tabla-tareas tbody").on("click", "a.edit", function () {            
        var data = table.row($(this).parents("tr")).data();


        $("#frmEditPressTask #id_press_task").val(data.id);
        $("#frmEditPressTask #title").val(data.title);
    });

Now when it's responsive, I can not retrieve the information from the row.

    
asked by Juan Pablo B 29.08.2017 в 16:11
source

0 answers