Removed redundancy in newer browsers by using default getElementsByClassName() if it exists.

This commit is contained in:
Eric Kever 2011-07-19 19:59:09 -04:00
parent c9968ff6be
commit ecd86cf8ee

View File

@ -69,7 +69,7 @@ function removeClass(element, name){
}
function doFancyExpensiveTabThings(){
var tabs = getElementsByClassName(document, "ul", "tabs");
var tabs = (document.getElementsByClassName ? document.getElementsByClassName("tabs") : getElementsByClassName(document, "ul", "tabs"));
for(var i = 0, j = tabs.length; i < j; i++){
var tabList = tabs[i].getElementsByTagName('li');