How can I modify the function of "Next" button in pagination and put my own function
How can I modify the function of "Next" button in pagination and put my own function
okayee
Posts: 22Questions: 6Answers: 0
I want to modify the pagination button. I have a dynamic table the loads data. I want to change the function of Next button to request additional data and load to the table
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @okayee ,
The easiest way is to disable the existing event handler in the
drawCallback
and create your own. It needs to be disabled on each draw, as the page draw would reactivate the default handler.See example here,
Cheers,
Colin
Hello @colin
Can you put pagination buttons on your example?
You just need to drop off the class, see this example here, that does all the pagination controls now.
Hello @colin
The drawCallback is work on me. I just simply change the a.pagination_button to li.pagination_button in able to detect the click in the button in pagination. Thanks a lot
Another question is. How can I specifically call the paginated_button next class in this example?
Ohh. it works. it just li.paginate_button.next. Thanks @colin
Yep, that was the first example I posted.