MediaWiki:Common.js: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 76: Line 76:
if (item.children.length > 0) {
if (item.children.length > 0) {
if(odd)
item.children.forEach(function (child) {
item.el.closest("tr").addClass("odd");
if(odd)
else
child.el.closest("tr").addClass("odd");
item.el.closest("tr").addClass("even");
else
odd = !odd;
child.el.closest("tr").addClass("even");
odd = !odd;
}
item.el.addClass("tt-parent");
item.el.addClass("tt-parent");
Confirmedusers, editor, Administrators
886

edits