neverwhere
11-18-2003, 08:30 PM
<div id="linkdiv" onMouseOver="mOver(this,'#000000');" onMouseOut="mOut(this,'#FFFFFF');"><script language="javascript">
<!--//
function mOver(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'default'; src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
//-->
</script>Works when I change it to a table, but not if its in a div. Can you have onMouseOver with CSS?
<!--//
function mOver(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'default'; src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
//-->
</script>Works when I change it to a table, but not if its in a div. Can you have onMouseOver with CSS?