How can I make a <div> layer visible when I put my mouse over something? I know there's a way by changing the style of it, but I think that only works in IE.
If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.
How can I make a <div> layer visible when I put my mouse over something? I know there's a way by changing the style of it, but I think that only works in IE.
Try this out (works in NS and IE):
Code:<script type="text/javascript"> function overFunc(ele, state) { var theDiv = document.getElementById(ele); switch(state) { case 'off': theDiv.style.display = "none"; break; case 'on': theDiv.style.display = "inline"; break; } } </script> <div style="display: none" id="div1">div content</div><BR> <table height="300" width="400"> <tr> <td style="background-color: #0000FF; border-style: black 1px solid; width: 75px" onMouseOver="this.bgColor='red'; overFunc('div1','on')" onMouseOut="this.bgColor='blue'; overFunc('div1','off')"> </td> </tr> </table>
- Brian
thanks