TypeError: $.fn.dataTable.colvis is not a constructor
TypeError: $.fn.dataTable.colvis is not a constructor
STKenneth
Posts: 7Questions: 3Answers: 0
I did as your answer but It still get same error.
Does it support server-side ?
jQuery(document).ready(function(){
oTable = jQuery("#mytable").DataTable( {
"dom": 'R<"#titrePlaceholder"><"H"lfr>t<"F"ip>',
"jQueryUI": true
});
var colvis = new jQuery.fn.dataTable.ColVis( oTable, {
"buttonText": "Aff./Cacher Col",
"exclude": [ 11 ],
"activate": "mouseover",
"overlayFade": 1000,
"restore": "Conf.Initale",
"showAll": "Affiche tout"
} );
jQuery( colvis.button() ).insertAfter('#titrePlaceholder');
});
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
I would very strongly suggest that you use Buttons rather than the legacy ColVis software. Having said that, the error you are getting suggests that the ColVis library has not been loaded.
Allan