I am working on datatable and trying to linking table data of each data:
<td style="overflow: hidden;" data-link="<%= receivemail_show_path("id" => trash_mail.id) %>">
<%= trash_mail.date.strftime("%e %b")%>
</td>
jQuery(function($) {
$("td[data-link]").click(function() {
window.location = $(this).data('link');
// window.document.location = $(this).data("href");
});
});
My problem is that this link works only for the first page on the datatable Can anyone kindly tell me why it should behave like this?