jQuery datatables plugin and only deleting from the first part of a table works
I use jQuery datatables plugin.
In my table I have a column for deleting rows. I used this selector in my column开发者_如何学JAVAs:
<td> <span class="icon_text accept"></span> </td>
And I wrote some code to delete a row from the table:
$(".accept").click(function (e) {
//Delete
});
Everything works fine, but just in page one of the table. It means if my table has more than one page, the selector does not work.
What should I do?
Change your JavaScript code to:
$(".accept").live('click', function(e) {
//Delete
});
精彩评论