I wrote a tab system using some very basic Javascript and it runs like a champ in IE 8 but, in FireFox 3 I am coming up short. The pertitent HTML is as follows:
<
You should skip the TextNodes, a simple function can help you:
function getFirstChild(el){
var firstChild = el.firstChild;
while(firstChild != null && firstChild.nodeType == 3){ // skip TextNodes
firstChild = firstChild.nextSibling;
}
return firstChild;
}
Usage:
var tabContainer = document.getElementById(TabContainer);
var tabs = getFirstChild(tabContainer);