
Home
Image Effects
Image Galleries
and Viewers
Here
|
Categories
Partners
DaniWeb is an exciting community for web developers, Internet marketers, and technology enthusiasts.
Other Sections
Advertisement
Compatibility
|
|
FF1+ IE5+ Opr7+
Image Thumbnail Viewer II Author:
Note: Script updated Feb 5th, 07' for various improvements. Description: Similar in function to Image Thumbnail Viewer, this script loads and displays a larger image when a thumbnail is clicked on. Great for letting visitors preview from many images then select the image of his choice to view on the same page. Features include:
Yes, deceptively loaded! Demos: Using conventional thumbnail images and activated "mouseover":
Using text links and activated "click":
Step 1: Add the following script to the <head> section of your page: The code references an external .js file, which you should download below:
Step 2: Add the following sample code to the <BODY> section of your page. It illustrates how to set up thumbnails to display their larger counterparts: As shown, a thumbnail link looks something like this: <a href="bulb.gif" rel="enlargeimage::mouseover" rev="loadarea">Thumbnail</a> Set the " rel="enlargeimage::mouseover" The two valid values for text following the delimiter (::) are "mouseover" or "click". Moving on, use the " rev="loadarea" In the above case, you're telling the script to load the enlarged image in
the DIV (or some other element) on the page with rev="loadarea::http://www.dynamicdrive.com" This causes the image to be linked to the specified URL. Finally, in IE5.5+, an optional fading transition can be applied to the enlarged image when it's shown. Note however, in order for this feature to work, the container on your page showing the enlarged image must have an explicit width (and ideally height) declared. For example: <div id="loadarea"
style="width: 500px"> This is simply a requirement of using IE's transition effects. |