You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

User:Yessiree/monobook.js: Difference between revisions

From MafiaWiki
Jump to navigation Jump to search
(fiddling with javascript)
 
(Blanked the page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
window.onload = init;


function init() {
var table = document.getElementById('completed');
var container = table.getElementsByTagName('tbody');
var list = container[0].children;
var count = list.length;
for ( i = 1; i < count; i++ ) {
console.log(list[i]);
if ( i % 2 == 0 ) {
list[i].className += "even";
} else {
list[i].className += "odd";
}
}
console.log(container);
console.log(list);
console.log(count);
}

Latest revision as of 20:56, 16 February 2014