I am trying to make div2
and div3
appear when I hover over div1
.
Here is the jsfiddle: http://jsfiddle.net/AbEZm/
HTML:
<div onMouseOver="show()" onMouseOut="hide()">Div 1 Content</div>
<div id="div2" style="display: none;>Div 2 Content</div>
<div id="div3" style="display: none;>Div 3 Content</div>
JavaScript:
function show() {
document.getElementById('div2', 'div3').style.display = 'block';
}
function hide() {
document.getElementById('div1').style.display = 'none';
}
But these functions do not make div2 and div3 appear. What is wrong?