MediaWiki:Tabs.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
no edit summary
mNo edit summary
mNo edit summary
Line 15: Line 15:
var tabs = getChildrenByTagName(tabcontents[i], "UL");
var tabs = getChildrenByTagName(tabcontents[i], "UL");
for( var j = 0; j < tabs.length; ++j ) {
for( var j = 0; j < tabs.length; ++j ) {
console.log(tabs[j]);
/* Move from tabcontents ul to tab ul */
/* Move from tabcontents ul to tab ul */
destinations[i].firstChild.appendChild(tabs[j].firstChild);
destinations[i].firstChild.appendChild(tabs[j].firstChild);
console.log(destinations[i].firstchild);
/* Remove the now empty tabcontents ul */
/* Remove the now empty tabcontents ul */
tabcontents[i].removeChild(tabs[j]);
tabcontents[i].removeChild(tabs[j]);
}
}
}
}