MediaWiki:Datatables custom.js: Difference between revisions

From Comprehensible Input Wiki
Content added Content deleted
(Created page with "// Create <thead> for DataTables to work var header = document.getElementById('library').createTHead().id = 'lib-thead'; jQuery('#lib-header').detach().appendTo('#lib-thead');")
 
No edit summary
Line 2: Line 2:
var header = document.getElementById('library').createTHead().id = 'lib-thead';
var header = document.getElementById('library').createTHead().id = 'lib-thead';
jQuery('#lib-header').detach().appendTo('#lib-thead');
jQuery('#lib-header').detach().appendTo('#lib-thead');

// Activate DataTable
$('#library').DataTable();

Revision as of 23:00, 4 February 2023

// Create <thead> for DataTables to work
var header = document.getElementById('library').createTHead().id = 'lib-thead';
jQuery('#lib-header').detach().appendTo('#lib-thead');

// Activate DataTable
$('#library').DataTable();