Topic: DD menu issue - hiding div layer |
|
|---|---|
| Author | Thread |
|
Obsessive-Compulsive (I) Inmate From: |
posted 07-20-2007 05:25
hey all. i don't know js well at all. i'm trying to hide a div when the mouse rolls off it (dd menu). It is only sometimes hiding it. here's what i have: |
|
Paranoid (IV) Inmate From: Florida |
posted 07-21-2007 09:46
I don't know much about JS, but this'll probably work: code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
#foo {
width: 300px;
height: 300px;
background: fuchsia;
}
</style>
</head>
<body>
<div id="foo"></div>
<script type="text/javascript">
var foo = document.getElementById('foo');
foo.onmouseout = function () {
foo.style.display = 'none';
}
</script>
</body>
</html>
|
|
Paranoid (IV) Inmate From: Norway |
posted 07-21-2007 10:18
Sorry no 7-char solution |