Forum Moderators: not2easy
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script type=text/javascript>
function ClassChange(element,newclass) {
if (event.srcElement.className == "furtherDef") {
event.srcElement.className = "highlight";
}
else {
event.srcElement.className = "furtherDef";
}
element.className = newclass;
}
</script>
<style type=text/css>
.highlight { background-color: #ccc; }
.visible {visibility:visible;}
.hidden {visibility:hidden;}
#b1 {
position: absolute;
top:0px;
}
#b2 {
position: absolute;
top:0px;
}
</style>
</head>
<body>
<div id=b1 class=visible>
Visible
<p id="p1" class="furtherDef" onMouseOver="ClassChange(p1,'highlight')" onMouseOut="ClassChange(p1,'furtherDef')"
onClick="ClassChange(b1,'hidden');ClassChange(b2,'visible');" >Click here</p>
</div>
<div id=b2 class=hidden>
Hidden
</div>
</body>
</html>
How to tune it for FF?
onMouseover="ClassChange(p1,'highlight'); return true;"