Difference between revisions of "MediaWiki:Common.js"
From Guardians of Ember Wiki
Line 10: | Line 10: | ||
var copy = thRows.clone(true).appendTo("thead"); | var copy = thRows.clone(true).appendTo("thead"); | ||
thRows.remove(); | thRows.remove(); | ||
+ | |||
+ | mw.loader.load ('http://emberguardians.com/customizations/floatthead/jquery.floatThead.js', 'text/javascript' ); |
Revision as of 14:16, 16 May 2019
/* Any JavaScript here will be loaded for all users on every page load. */
var myTable = jQuery("#myTable");
var thead = myTable.find("thead");
var thRows = myTable.find("tr:has(th)");
if (thead.length===0){
thead = jQuery("<thead></thead>").appendTo(myTable);
}
var copy = thRows.clone(true).appendTo("thead");
thRows.remove();
mw.loader.load ('http://emberguardians.com/customizations/floatthead/jquery.floatThead.js', 'text/javascript' );