MediaWiki:Common.js: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 68: Line 68:
item.el.addClass("tt-parent");
item.el.addClass("tt-parent");
item.showChildren = true;
item.showChildren = true;
item.before("<span id='content_" + item.el.attr("data-tt-id") + "'>");
if(item.parent != undefined)
{
item.children.forEach(function (child) {
$(child.el).closest("tr").addClass(item.parent.el.attr("data-tt-id"));
}
}
}
}
if(item.parent != undefined)
$(item.el).closest("tr").addClass(item.parent.el.attr("data-tt-id"));
});
});


Line 130: Line 121:


hide(id);*/
hide(id);*/
$("." + $el.attr("data-tt-id")).fadeOut();
$("#content_" + $el.attr("data-tt-id")).fadeOut();
}
}
else {
else {
Line 138: Line 129:
$(child.el).closest("tr").removeClass("tt-hide");
$(child.el).closest("tr").removeClass("tt-hide");
});*/
});*/
$("." + $el.attr("data-tt-id")).fadeIn();
$("#content_" + $el.attr("data-tt-id")).fadeIn();
}
}


Confirmedusers, editor, Administrators
886

edits