Log in

View Full Version : mouseover + dynamic change



hhbrady
01-24-2008, 02:33 PM
Hi everyone,

I could swear that a while back I was looking on DD, and found a script that not only allowed you to create rollover images--but upon rollover also activated a box of changing information off to the side.

Am I crazy or has someone else come across this as well? Because, naturally, now I need it I can't find it.

Thank you!
Heather

TimFA
01-24-2008, 03:29 PM
Something like that wouldn't be to hard to make, image rollovers are pie.



onMouseOver="this.src='newimage.jpg';"
onMouseOut="this.src='oldimage.jpg';"


And you can do something similar to what you are talking about with the text.



onMouseOver="this.src='newimage.jpg';document.getElementById("div").style.display='inline';"
onMouseOut="this.src='oldimage.jpg';document.getElementById("div").style.display='none';"


The complete HTML:



<img src="none" alt="image" onMouseOver="this.src='newimage.jpg';document.getElementById("div").style.display='inline';"
onMouseOut="this.src='oldimage.jpg';document.getElementById("div").style.display='none';">
<div id="div" style="display: none;">
info info info
</div>


They may have used better/more efficient coding, but that should get the job done. No I have never come across anything like that on DD. Let me know if this wasn't what you were talking about.

Tim