Hi,
I'm a real javascript newbie, good with php.
I am trying to utilize onmouseover, and onmouseout with div's and text.
the goal is: when you hover over some text in a <div> it displays other text and then if you hover off it, it keeps the text there. It's exactly like the home page for mint.com if thats helps explain it.
Not sure how to write the function that shows one div when another is hovered.
What I have got to so far is:
function toggle(id,id){
d=document.getElementById(id);
d.innerHTML=document.getElementById(id);
}
<a href="" onmouseover="toggle('thetext1','thetext')" onmouseout="toggle('thetext1','thetext1')">Hover Here</a>
<div id="thetext">
Text in here with other divs to style it.
</div>
<div id="thetext1">
Text in here with other divs to style it.
</div>
Not sure if I am close or way off.
Thanks for you help.
Cheers,
Qwaz