Hello, I have the following problem. I searched a lot, here and in google and I can not find the problem.
I have a table that is updated dynamically: PHP + Mysql + Jquery
The table that is initially loaded looks like this:
<table class="table table-striped table-bordered table-hover">
<tbody>
<tr>
<td><i class="fa fa-envelope fa-1x" title="Cerrada"></i> RA 02-16 </td>
<td>15-087B-16-1</td>
<td>950,00</td>
<td style="text-align: right">118385,50</td>
<td style="text-align: right">118385,57</td>
<td style="text-align: center"><a href="#viewC" data-value="4" data-toggle="modal" class="link-view-c"><i class="fa fa-eye link-view-c-child" data-value="4" aria-hidden="true"></i></a></td>
</tr>
<tr>
<td><i class="fa fa-envelope fa-1x" title="Cerrada"></i> RA 17-17</td>
<td>15-087B-17-2</td>
<td>142,00</td>
<td style="text-align: right">11112,12</td>
<td style="text-align: right">11112,12</td>
<td style="text-align: center"><a href="#viewC" data-value="14" data-toggle="modal" class="link-view-c"><i class="fa fa-eye link-view-c-child" data-value="14" aria-hidden="true"></i></a></td>
</tr>
</tbody>
I have the following to capture the ID that I define in the data-value field in the link in the last column.
<script>
$(document).ready(function () {
$(".link-view-c").on('click', '.link-view-c-child', function () {
v = $(this).data('value');
alert(v);
});
});
The problem is that when the table is initialized, it loads the first block, I get the ID, but when I go to the next block it does not do anything. And I use
on('evento', 'destino', function())
class link-view-c-child from the second block is supposed to trigger the event.
Any help that unlocks this to me please.
Sldos