I have a CRUD of DATA, in which I try to do something interactive with jQuery:
This is the part of the table, in which it contains the data, and its buttons to edit, see etc.
<td><input type="checkbox" name="check"></td>
<td>' .$row[npedido]. '</td>
<td>' .$row[fecha]. '</td>
<td>' .$row[cod_cliente]. '</td>
<td>' .$row[nombre_cliente]. '</td>
<td>' .$row[referencia]. '</td>
<td>' .$row[detalles]. '</td>
<td>' .$row[tipo]. '</td>
<td><i id="'.$row[npedido].'" class="fas fa-edit"></i></td>
<td><i class="fas fa-eye"></i></td>
<td><i class="fas fa-print"></i></td>
<td><i class="fas fa-trash-alt"></i></td>
I am trying with the edit button, to which I have assigned, to the edit icon, the "id" of the corresponding request.
What do I try to get now? * That when you click, a "Modal" with the data to edit opens.
The modal, I already have it ready.
- I've tried some things with jquery, like trying to call it from class, but it does not work for me:
$( ".fa-edit" ).click(function() { $('#editarPedido').show(); });
Any advice, recommendation or contribution?
Thank you very much!