div onMouseOut question..
Posted: Sat Jun 12, 2010 12:05 pm
So I have two divs contained in another div, on the outside div onMouseOut I want to alert the id, but when I run my mouse over the two divs contained inside I get a mouseOut condition. This is driving me crazy, any help is greatly appreciated! Here is my code.
Code: Select all
<html>
<head>
<script type='text/javascript'>
function getId(id){
alert(id);
}
</script>
<body>
<div id='holder' onMouseOut='getId(this.id)' style='width:100; height:100; border:2px solid black;'>
<div id='inside1' style='cursor:pointer;'>Text1</div>
<div id='inside2' style='cursor:pointer;'>Text2</div>
</div>
</body>
</html>