Hi, im really not very clued up with javascript and have managed to put this together with help from the css forum.
Im trying to show and hide a div on mouse over an image and mouse out.
At the moment ive sourced code to get it to show and hide the div onclick but need to achieve sho and hide div on mouse over and mouse out?
any help much appreciated
heres the code i have at the moment
Thanks
Ben
Im trying to show and hide a div on mouse over an image and mouse out.
At the moment ive sourced code to get it to show and hide the div onclick but need to achieve sho and hide div on mouse over and mouse out?
any help much appreciated
heres the code i have at the moment
Code:
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function toggle(el)
{
myEl = document.getElementById(el);
myEl.style.display = (myEl.style.display == 'none') ? 'block' : 'none';
}
</script>
</head>
<body>
<div id="show" style="display: block;"><a href="#" onclick="toggle('show');toggle('hide');toggle('a');"><img src="logopoint.gif" width="14" height="17" border="0"></a></div>
<div id="hide" style="display: none;"><a href="#" onclick="toggle('show');toggle('hide');toggle('a');">Close</a></div>
<div id="a" style="display: none;">This is a logo</div>
</body>
</html>
Thanks
Ben