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

תאימות
מאין תקציר עריכה
שורה 68: שורה 68:
             Button.appendChild( document.createTextNode( "]" ) );
             Button.appendChild( document.createTextNode( "]" ) );


             var Header = Tables[i].getElementsByTagName( "tr" )[0].getElementsByTagName( "th" )[0];
             var Header;
            if (Tables[i].className.indexOf("otherrow") != -1)
                Header = getElementsByClassName(Tables[i], "TD", "headerrow")[0];
            else
                Header = Tables[i].getElementsByTagName( "tr" )[0].getElementsByTagName( "th" )[0];
             /* only add button and increment count if there is a header row to work with */
             /* only add button and increment count if there is a header row to work with */
             if (Header) {
             if (Header) {