Learn originating table in event handler

Learn originating table in event handler

CarstenCarsten Posts: 5Questions: 3Answers: 0

In an event handler such as https://datatables.net/reference/event/order , i.e.

function( e, settings ) { ... }

is it possible to learn the table object from which the event originated from e or settings? (or by some other means?)

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓
    var api = new $.fn.dataTable.Api( settings )
    

    will give you an API instance for the table in question. Then you can use table().node() (for example) to get the table element.

    Allan

This discussion has been closed.