How to get datatable in event

How to get datatable in event

KevinBuiKevinBui Posts: 2Questions: 1Answers: 0

Hi there,
I want to apply plugin fnFilterOnReturn for all table in all page.
I don't want to manual add .fnFilterOnReturn() method on every page.
So I intend to add this code to event 'init.dt", in my common javascript file (that already included in all page)

$(document).on('init.dt', function (e, settings) {
datatableInstance.fnFilterOnReturn();
});

but the problem is how I can get datatableInstance in this event.

Answers

This discussion has been closed.