Lightbox2 & Image Maps
Hey all,
I want to use Lightbox2 with image maps and it's proving troublesome. I've done some googling on the subject and I thought the bug was fixed in the latest release. Has anyone else encountered the same problem?
One solution I found was:
For those attempting to use an imagemap ( image map ) with related images make sure you find the Both lines of
var anchors = document.getElementsByTagName('a');
and change the 'a' to 'area'. Their on lines 172 and 326
However, this doesn't seem to relate to the code.
Any help appreciated. See my working URL here: http://www.sunnyvale.com.au/siteplan/9/
serpico
serpico posted this at 04:25 — 1st December 2008.
They have: 121 posts
Joined: Aug 2008
Found my solution.
In case anyone needs it, it is because rel is not an attribute of the area tag in HTML 4 or in XHTML 1.0 Strict/Transitional. This means that Lightbox2 wont work for image maps in any browser which pays attention to valid HTML... FF, Opera, Chrome, Safari ...but works fine in IE.
Alexander Kaletsch has the workaround for Lightbox with image maps.
serpico
decibel.places posted this at 15:19 — 1st December 2008.
He has: 1,494 posts
Joined: Jun 2008
I am using the Lightbox2 Drupal module for videos
see it here
(I added some custom code to generate the link...)
You must copy the jquery.js file from the Jquery Update module to misc/jquery.js
it is working in IE and FF, in Chrome the video loads full screen in the window, in Opera there is a prompt to save the video..
needabeer posted this at 17:13 — 11th November 2012.
They have: 1 posts
Joined: Nov 2012
I want to use Lightbox2 with image maps and it's proving troublesome. I've done some googling on the subject and I thought the bug was fixed in the latest release. Has anyone else encountered the same problem?
One solution I found was:
For those attempting to use an imagemap ( image map ) with related images make sure you find the Both lines of
var anchors = document.getElementsByTagName('a');
and change the 'a' to 'area'. Their on lines 172 and 326
However, this doesn't seem to relate to the code.
Any help appreciated. See my working URL here: http://www.sunnyvale.com.au/siteplan/9/
This fix works for version 2.51 but "var anchors = document.getElementsByTagName" only appears once, in lightbox.js function 'initLightbox', on line 286. Change 'a' to 'area' and hey presto!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.