PDA

View Full Version : Image zoom in/out Script


alias59
09-25-2002, 06:27 PM
Hi all,
I'm using the Image Zoom script from http://www.javascriptkit.com/script/script2/imagezoom.shtml#

It works great and thanks to anyone who contributed.

You can see it in action at http://cruisinghelp.com/TestZoom1.htm

I'd like to modify it but am a complete beginner w/Javascript.

What I want to do is change the initial image appearance from "normal" (ie actual size) to a Zoomed size (e.g., 50% smaller). This would allow me to use a high-res image (eg 1600x1200) that when zoomed IN provided a lot of detail, but when initially loaded would still fit in a standard page (eg 800x600).

Thanks in advance for any help, and for any suggestions.

BJ

ShriekForth
09-25-2002, 09:37 PM
Why don't you just declare the image a smaller size.


<div style="position:relative;width:1337";height:1060"><div style="position:absolute">
<img name="myimage" src="http://cruisinghelp.com/BigC1.jpg" width="1337" height="1060">



Then zooming in will gradually increase to the real size, and it will still look OK because it was scanned that that resolution.

ShriekForth