PDA

View Full Version : popup thumbnail preview on rollover



gk-interactive
11-24-2005, 08:44 AM
Can anyone advise me on where to go to find some javascript to allow user to rollover a thumbnail image and be able to preview a larger image directly above it?

Any feedback would be good, thanks

jscheuer1
11-24-2005, 11:35 PM
Image Thumbnail Viewer II (http://dynamicdrive.com/dynamicindex4/thumbnail2.htm)

and

Image Thumbnail Viewer (http://dynamicdrive.com/dynamicindex4/thumbnail.htm)

Some configuration required. For the Image Thumbnail Viewer II, lay out the:


<div id="dynloadarea" style="width:80px;height:225px"></div>

above your thumbnails on the page.



For the Image Thumbnail Viewer, configure the coordinates for the pop up division to a set location of your choosing:

Find these two lines in the script:


crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"

and set them to the desired location, ex:


crossobj.style.left="250px"
crossobj.style.top="200px"

and use the syntax without the center and dimensions in your HTML but set it to onmouseover (from the demo[sic]):


<a href="photo1.jpg" onmouseover="return enlarge('photo1.jpg',event)" onclick="return false;">
<img src="thumbnail.gif" border="0"></a>