I use the above code to show the first hidden div in a series of related divs (i.e. so running the script 5 times will show 5 of the divs)Code:// Display the next hidden box in a series of related items function showbox(type){ var divs = document.getElementsByTagName('div'); var el, i = divs.length; while( i-- ){ el = divs[i]; if(el.getAttribute('class') == type){ alert("this doesnt show in ie7"); if(el.style.display == 'none'){ el.style.display = 'block'; break; } } } }
that line works as expected in opera/firefox/konqueror, but not in IE7. Is there a universal alternative?Code:if(el.getAttribute('class') == type)
Cheers!


LinkBack URL
About LinkBacks
Reply With Quote