Mai
06
2008

Workaround (area rel) for Lightbox using Firefox

Hi folks,

This post is kept in English, because of some users in the Lighbox forum (Thread) having the same problem.

Bug description
Using Lightbox 2.04 with area tags an rel="lightbox" or rel="lightbox[Group]" in Firefox will result in a java-script error.

Reason for the Bug:
rel is not an attribute of area neither in HTML 4 (see http://www.w3.org/TR/html4/index/attributes.html) nor in XHTML 1.0 Strict/Transitional (see http://www.w3.org/TR/xhtml1/#defs and take a look at the DTS..).
Consequence: imageLink.rel doesn't work with Firefox.

Workaround:
But Prototype is still able to get the attribute :)
So just replace imageLink.rel with Element.readAttribute($(imageLink), "rel") and enjoy Lightbox!

42 Kommentare »

RSS feed for comments on this post. TrackBack URL


Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com