7

I want to call a java script function when user click on pagination link in jquery datatable.

How can i do that?

Manivasagan
  • 212
  • 1
  • 6
  • 17
  • In jquery datatable, it showing pagination link like prev,next. When user click on next or previous link i would like to call a java script method. i need to control some ajax request at that time. – Manivasagan Mar 06 '13 at 05:18

1 Answers1

3

You can use page event, which is fire after page changed. Bind page event after datatables initialization:

$('#table_instance').dataTable({some attributes});

$('#table_instance').bind('page', function () {
    //call some function here
});
Lukasz Koziara
  • 4,274
  • 5
  • 32
  • 43