im using this code now which works fine in FF, but not IE!
<script language="Javascript">
function hasClass(el, class) {
class = class.toLowerCase()
var classNames = el.className.toLowerCase();
classNames = classNames.split(" ");
for (var i = 0; i < classNames.length; i++) {
if (class == classNames[i]) return true;
}
return false;
}
function fade(class, fadeIn) {
var els = document.getElementsByTagName("li");
for (var i = 0; i < els.length; i++) {
els[i].style.opacity = (hasClass(els[i], class) || !fadeIn) ? '1.0' : '0.5';
}
}
</script>
<li onMouseover="fade('CategoryBrand', true)" onmouseout="fade('CategoryBrand', false)"> test </li>
<li>
<img class="CategoryBrand CategoryExperiential CategoryDigital " width="100" height="100" alt="" src="test.png">
</li>
can anybody help me get it to work in IE?
here's the error message:
SCRIPT1010: Expected identifier
line 108 character 23: function hasClass(el, class) {
LOG: [cycle] terminating; zero elements found by selector