Reputation: 1173
I'm using the jQuery DataTables plugin. Within its initComplete
callback (which has settings as parameter available) I'm trying to make a jQuery table object.
With the following command (from DataTables.Settings
)
var api = new $.fn.dataTable.Api( settings );
it's easily possible to create a (datatables) table object? All attempts to convert it to a jQuery object failed. The jQuery object is needed, since I need it's find
method later on.
Is there a way to get a jQuery object form the settings directly. Or if not, can the API be converted to a jQuery one?
Upvotes: 0
Views: 857
Reputation: 58860
You can use table().node()
API method.
var api = new $.fn.dataTable.Api( settings );
$(api.table().node()).addClass('highlight');
Upvotes: 1