MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
for (var r = 0; r < rows.length; r++) { | for (var r = 0; r < rows.length; r++) { | ||
if (r % 2 == 0) { | if (r % 2 == 0) { | ||
rows[ | rows[r].className = "grayrow"; | ||
} | } | ||
} | } |
Revision as of 03:39, 23 September 2007
/* Any JavaScript here will be loaded for all users on every page load. */ // Highlight every other line in the software tables var orig_onload = window.onload; window.onload = function(e) { if (orig_onload != null) { orig_onload(e); } var tables = document.getElementsByTagName("table"); var rows; for (var t = 0; t < tables.length; t++) { if (tables[t].className == "software") { rows = tables[t].rows; for (var r = 0; r < rows.length; r++) { if (r % 2 == 0) { rows[r].className = "grayrow"; } } } } }