Question

I am trying to use Lightbox 2 (ver 2.51) with an image map. The site is for a theme park, and the park map image has 8 areas, and each area should have its own slideshow. I tried using rel="lightbox[group1]" but apparently "rel" doesn't work with "area" as it does with "a". The solution on the Lightbox 2 forum page is here http://www.patworx.de/blog/?p=20 and says:

"Workaround: But Prototype is still able to get the attribute :) So just replace

imageLink.rel

with

Element.readAttribute($(imageLink), "rel")

and enjoy Lightbox!"

However, I can't find imageLink.rel in the lightbox.js file. This solution mentions Lightbox 2.04, so it may be an outdated solution now. Any ideas for the latest version of Lightbox 2? Thanks in advance.

EDIT:

http://jsfiddle.net/GBpjJ/

Was it helpful?

Solution

I finally answered my own question, in case anyone else is interested...I found this page that actually has a few different ways to do an image map without the "area" tag, which lets you use the "rel" tag with an anchor tag in an image map. The one that worked for me was example 2a. Hope this can help someone else.

http://www.wickham43.net/imagemaps.php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top