Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Also, with your original function you'll have to either to it with 1,0 like Tripy, or else put single quotes around your arguments. The way you're passing the (in), (out), the it looks as if you expect there to be a two variables named in, out, and are passing those. Try ('in'), ('out'). You could also just pass (true), (false) and test for that.
HTML Code:
<script type="text/javascript">
function navsi(appear) {
if(appear){
document.getElementById("navsi").style.display="block";
}
else {
document.getElementById("navsi").style.display="none";
}
}
</script>
<ul>
<li onmouseover="navsi(true)" onmouseout="navsi(false)">Hover Me!!</li>
<div id="navsi" style="display:none;">Hi there!!</div>
</ul>
Putting DIV within a UL without wrapping it in a LI is not valid code, and might cause problems in different browsers.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
Last edited by wayfarer07; 03-22-2010 at 09:54 AM..
|