Helo.
I have a TD element, with a SPAN element inside. I use td-s onmouseover and onmouseout events for a small animation.
My problem is, that, when I move the cursor over the SPAN element,
the onmouseout event for TD element is fired. I want to prevent this. With other words, I want onmouseout fired, just when the cursor is moved outside the td area.
See the code..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>delay</title>
<script language="javascript">
function over(e,id) {
document.getElementById(id).style.backgroundColor = "#333333";
alert('over: '+id);
}
function out(e,id) {
document.getElementById(id).style.backgroundColor = "#cccccc";
alert('out: '+id);
}
</script>
</head>
<body>
<table width="950" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#CCCCCC" id="td1" onmouseover="over(this.id);" onmouseout="out(this.id);">
<span>Google</span>
</td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
</tr>
</table>
</body>
</html>