View Full Version : Expando Image script

07-25-2016, 01:21 PM
1) Script Title: Expando Image script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/expandoimage.htm

3) Describe problem: I need to add a line of text under the image after it expands
please help

07-25-2016, 09:46 PM
Script author here - Though it's probably possible to get this script to do that, it would greatly increase it's footprint. Unlike other scripts that already create a faux window from a div (The original one is Lighbox), which can include the larger image and a caption, with this script there is nothing other than the image. We would have to add an element (probably a div) and have that contain the desired text, but only when the image is enlarged.

A good compromise might be to just give your expando image(s) a title attribute. Since the cursor needs to be over the image anyway in order for it to be expanded, a title attribute would show, example:

<img title="This is my favorite cat, Marcie. She has been with us for almost 8 years" class="expando cat" border="0" src="cat.png" width="200" height="88">

If that's not good enough for you, I would suggest you look into Lightbox, which gives you an enlarged image with fade in (not zoom) and optional captions:


or other similar scripts, some of which have an option for the image to appear to expand and include a caption with the expanded image. Fancybox has an option like that:


Click on the second image.

07-28-2016, 10:24 AM
ok thank you the title attribute did,nt work but I tried the lightbox & went for that, thanks