# javascript show div on mouseover



## eric_sc

hello:

i am making a website and i want to have a layer that is hidden, and when the mouse moves overtop of it, it appears. Seems simple but i can't figure out the scripting for it. I tried making the hidden but it doesn't show anything ever, so i know i need a javascript but i have tried a few functions and don't know which direction to go.

any ideas?


----------



## JimmySeal

The typical way to make a div hidden is to set its _display_ style attribute to _none_:

Div contents!

Then to show or hide it, you would put JavaScript in another element's event handlers to change this element's _display_ style:


----------

