Onmouseover for complete novice

T

Toby A Inkster

Ixon said:
David said:
Ixon said:
<div id="layer1" style="visibility:visible"
onMouseover="this.style.visibility='hidden';
document.all['layer2'].style.visibility='visible'">something</div>
<div id="layer2" style="visibility:hidden"

onMouseout="this.style.visibility='hidden';document.all['layer1'].styl
e.visibility='visible'">else</div>

document.all is IE specific, you should use DOM

Browsers without CSS support will display both versions at once.

Could you rewrite my example using DOM, please ?

Instead of document.all['someID'] use document.getElementById('someID').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top