Menu
Hello there, I’m trying to change CSS with a mouseover event, it works fine in FF but doesn’t work at all in IE (6, I used to have 7 but FF3 crushed it).
here come’s the code:
[CODE]
<script language=”JavaScript” type=”text/javascript”>
function OverButton(item) {
document.getElementById(item).setAttribute(“class”, “main2”);
}
function OutButton(item) {
document.getElementById(item).setAttribute(“class”, “main”);
}
</script>
I call it like this:
[CODE]
<a href=”#” onmouseover=”OverButton(‘data1’)” onmouseout=”OutButton(‘data1’)”>link</a>