I'm not an expert in JQuery so this question may be applied to plugins other than DataTables. Suppose I want to declare an additional(custom) setting in the initialisation:
var dTable = $('#example').DataTable(
...,
'myOption' : [{ 'text' : 'Foo' } , { 'text' : 'Bar' }, ...],
)
and if myOption is declared, i want to automatically call a function like this one(like a callback function):
function() {
console.log(dTable.settings().myOption)
}
so basically, i want to extend a plugin but i do not understand how it can be done from the manuals or other examples. How can I achieve that?