Get access to jquery object when using selector.DataTable()
Get access to jquery object when using selector.DataTable()
INTONE
Posts: 153Questions: 58Answers: 6
I am trying to trigger a deselect from within another handler but I cannot get access to jquery object.
campaignRewardTable = $('#campaignReward').DataTable({...});
campaignRewardTable.on( 'deselect', function () {...});
getMerchants().success(function (data) {
campaignRewardTable.ajax.reload( null, false );
campaignRewardTable.trigger('deselect'); //Uncaught TypeError: campaignRewardTable.trigger is not a function
});
Any help is appreciated.
This discussion has been closed.
Answers
Seems I cannot call a trigger on campaignRewardTable because it was not created by native jquery.
Two options:
table().table()
to get thetable
element and then use$()
on itAllan