Deanna
05-28-2020, 10:12 PM
Hello everyone. First time poster, long-time fan as the saying goes. What seems like half a lifetime ago I used to know how to code HTML and CSS. I used many DD scripts in my web sites and came here often for help and inspiration. Then I stopped. Now I've started again and, man, has coding changed with the advent of HTML5 and CSS3. I need some help.
I have a large image map with many "hot spot" coordinates.
1. You mouse over the "hot spot" and a pop up image appears on the screen;
2. You move your mouse off of the "hot spot" and the image is gone from the screen.
So what I'm after is "on hover" not "on click."
Aside from keeping the popup image within the boundaries of the viewport and perhaps having a smooth fade in/fade out effect for the pop up image, that's all I'm after.
Here is an example of how I envision this:
http://theinspirationgallery.com/D2-2020/images/image_map_example.png
All of the red boxes will become "hot spots."
Years ago I used to be able to do exactly what I just described using JavaScript but the code I used then is now outdated and doesn't work.
<div align=center><img src="images/mysticzon.png" width=920 height=672 border=0 usemap="#mysticzon">
<map name="mysticzon"></div>
<area shape="rect" coords="480,118,550,248" href="javascript:void(null)" onfocus="if(this.blur)this.blur()" onMouseOver="writetxt('<div><img src=mysticzon-titans.png border=0 height=412 width=480></div>')" onMouseOut="writetxt(0)">
</map>
Since this is just for me, I don't need this to be cross-browser compatible. I use Chrome and that's all this has to work in. I have an old but still reliable image edit app that will outline the image map's hot spot co-ordinates, so I'm good to go in that department.
I'd appreciate it very much if anybody can point me in the right direction of how to make this work.
I have a large image map with many "hot spot" coordinates.
1. You mouse over the "hot spot" and a pop up image appears on the screen;
2. You move your mouse off of the "hot spot" and the image is gone from the screen.
So what I'm after is "on hover" not "on click."
Aside from keeping the popup image within the boundaries of the viewport and perhaps having a smooth fade in/fade out effect for the pop up image, that's all I'm after.
Here is an example of how I envision this:
http://theinspirationgallery.com/D2-2020/images/image_map_example.png
All of the red boxes will become "hot spots."
Years ago I used to be able to do exactly what I just described using JavaScript but the code I used then is now outdated and doesn't work.
<div align=center><img src="images/mysticzon.png" width=920 height=672 border=0 usemap="#mysticzon">
<map name="mysticzon"></div>
<area shape="rect" coords="480,118,550,248" href="javascript:void(null)" onfocus="if(this.blur)this.blur()" onMouseOver="writetxt('<div><img src=mysticzon-titans.png border=0 height=412 width=480></div>')" onMouseOut="writetxt(0)">
</map>
Since this is just for me, I don't need this to be cross-browser compatible. I use Chrome and that's all this has to work in. I have an old but still reliable image edit app that will outline the image map's hot spot co-ordinates, so I'm good to go in that department.
I'd appreciate it very much if anybody can point me in the right direction of how to make this work.