מדיה ויקי:Collapsetables.js: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
Rotemliss (שיחה | תרומות)
תמיכה גם באנגלית, אם שפת הממשק אנגלית, בדומה למדיה ויקי:Navigationbar.js
Rotemliss (שיחה | תרומות)
ניסיון לתיקון הבעייה של הצגת השורות
שורה 14:
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
var allRows = Table.getElementsByTagName( "tr" );
 
if ( !Table || !Button || Rows.length == 0 ) {
return;
}
 
var Rows = TableRows[0].getElementsByTagName( "tr" )parentNode.childNodes;
 
if ( Button.firstChild.data == collapseCaption ) {
for ( var i = 1; i < Rows.length; i++ ) {
if ( Rows[i].style.displaynodeType == document.ELEMENT_NODE ) "none";{
Rows[i].style.display = "none";
}
}
Button.firstChild.data = expandCaption;
} else {
for ( var i = 1; i < Rows.length; i++ ) {
if ( Rows[i].style.displaynodeType == Rows[0]document.style.display;ELEMENT_NODE ) {
Rows[i].style.display = "";
}
}
Button.firstChild.data = collapseCaption;