开发者

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
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜