JS-Zoom Lens®
The Ultimate Javascript Product Zoom!
v.0.89
INTEGRATION OF JAVASCRIPT ZOOM LENS
The integration of Javascript Zoom Lens is pretty simple. Please find all the information that you need below.
1.) Load Javascript and CSS
The first step in getting the javascript zoom lens to run on your page is to load the external javascript and css files.
Therefore please copy the lines below into the "head" of your page. Please copy jszoom.js into the /js folder and the jszoom.css into the css folder.
You might have to create these directories.
2.) Copy HTML into your page
After you have linked in the external files please copy the following html into the body and appropirate location of your page.
3.) Image Generation / Naming Conventions
Now that you have all the code implemented into you page let's have a closer look at images and how to name them.
Javascript Zoom Lens requires at least 2 different image sizes to work, a reguar image and a zoom image. The code example used on this page is using "vmax_regular.jpg" and "vmax_zoom_0.jpg".
You will have to sequence your zoom images to support different levels of magnification. For example: "vmax_zoom_0.jpg", "vmax_zoom_1.jpg", "vmax_zoom_2.jpg", etc.
In your HTML you will find the following piece of code. This code is initializing the javascript zoom lens and also
determines the naming convention of your images and their location.
The variable "name_prefix" defines the prefix of your images. So for example your image is named: vmax_regular.jpg,
you would set this variable to "vmax_".
The variable "image_path" simply sets the path to your images. If your document is located in the root directory and your images
are located in a directory called "images", you would set this variable to "images/".
4.) Lens Adjustments / CSS
Javascript Zoom Lens is fully customizebale and the few styles below show you how easy it is.
Here real quick a few words to the individual styles:
#magnifier_space = defines the location of your standard_image, can be set to relative or absolute.
#magnifying = defines the look and feel of the magnifying lens, width and height define the size of the zoom lens.
#optionsmenu = defines the look and feel of the options popup menu.
If you have any other questions or you need help, please contact me.