Proper Way To Extend DataTable
Proper Way To Extend DataTable
Nahuel
Posts: 2Questions: 0Answers: 0
Hi,
I want to set some parameters as default for all my DataTable instances. I wonder if there's a proper way to extend the class like jQuery UI widgets [0]?
Thanks in advance
Nahuel
[0] http://wiki.jqueryui.com/w/page/12138135/Widget-factory
I want to set some parameters as default for all my DataTable instances. I wonder if there's a proper way to extend the class like jQuery UI widgets [0]?
Thanks in advance
Nahuel
[0] http://wiki.jqueryui.com/w/page/12138135/Widget-factory
This discussion has been closed.
Replies
[code]
var defaults = {
"bSort": false,
"bProcessing": true
};
$('#example').dataTable( $.extend( true, {}, defaults, {
"bFilter": false
} ) );
[/code]
Which is basically the same thing - you have your own defaults objects and control it rather than DataTables managing it.
Allan
Thanks agian.
Nahuel
Allan