How do I create several tables with the same settings?
How do I create several tables with the same settings?
Is there a way to create several tables with the same datatable settings without having to enter them each time?
For instance, I've got a table called 'sub-tag' and I want to reuse the same dataTable settings for another table called 'sub-link'.
[code]
sub_tag=$("#sub-tag").dataTable({"iDisplayLength":20, "bLengthChange":false, "bFilter":false, "bAutoWidth":false,
"sDom": 'lfrt',
"aoColumns": [{"bSortable":true}, {"bSortable":false}],
"aoColumns": [{"sType":"html"}, null]});
[/code]
For instance, I've got a table called 'sub-tag' and I want to reuse the same dataTable settings for another table called 'sub-link'.
[code]
sub_tag=$("#sub-tag").dataTable({"iDisplayLength":20, "bLengthChange":false, "bFilter":false, "bAutoWidth":false,
"sDom": 'lfrt',
"aoColumns": [{"bSortable":true}, {"bSortable":false}],
"aoColumns": [{"sType":"html"}, null]});
[/code]
This discussion has been closed.
Replies
Allan