Issue With Pagination

Issue With Pagination

AshutoshDikshitAshutoshDikshit Posts: 2Questions: 0Answers: 0
edited September 2013 in DataTables 1.9
I have a datatable in which I am assigning the values by iterating a list which contains my table data. The last column (Actions) of my table contains 2 icons i.e Open & Delete for which the markup I have written is this :
[code]

[/code]

I alert the row values when this icon is clicked. This works perfectly when I am on the first page of the table, as i move to page next page the click doesnt work at all. I tried to display all the records in a single page (i.e. by disabling pagination) and everything worked fine.

something is wrong with the pagination. It would be great if anyone can help me on this

I am using datatables 1.9.4 version

Replies

  • Rishabh_s_chauhanRishabh_s_chauhan Posts: 5Questions: 0Answers: 0
    edited September 2013
    You have to use either .live() or .on() for the click event,because normal jQuery click event would not work on the next page.
    [code]
    $(document).on("click",".example",function(){

    });
    [/code]
  • AshutoshDikshitAshutoshDikshit Posts: 2Questions: 0Answers: 0
    edited September 2013
    live() worked for me though i am using jquery 1.8 (quite strange coz it should not work beyond 1.7).

    on() did not work .
  • Rishabh_s_chauhanRishabh_s_chauhan Posts: 5Questions: 0Answers: 0
    edited September 2013
    (Atleast it worked)
This discussion has been closed.