How do you add events?

How do you add events?

streetlightstreetlight Posts: 26Questions: 0Answers: 0
edited October 2012 in General
Hey everyone,

I'm trying to find some documentation that gives an example of adding an event -- specifically the "page" event (referred to here -- http://datatables.net/docs/DataTables/1.9.0/#page). I can see that it exists, but can't find a real example of it to replicate. I found out about the issue in a seperate thread, but I thought if I generalized it maybe someone out there can point me in the right direction as to where and how I can add this (or any) events. I'm on Datatables 1.7.6.

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Add it to the node:

    [code]
    $('#myTable').on('page', function () {...} );
    [/code]

    However - worth noting that events weren't introduced until 1.8, and 1.9 made them more rounded (I think possibly introducing the `page` event).

    Allan
This discussion has been closed.