My way to Image maps work in Firefox

19 views
Skip to first unread message

[Axel]

unread,
Apr 6, 2011, 8:52:36 AM4/6/11
to Slimbox
A Topic that did show up a lot of times is that image-maps are not
working in Firefox.
This can be easily fixed by updating the autoload code block (as
suggestet by Chris)

<quote>
In the meantime here is a quick fix: update the autoload code block
and replace all occurences of:

el.rel with: el.getProperty('rel')

and also:

this.rel with this.getProperty('rel')

Then your image maps will work again.
</quote>

As Chris found out later-on the "rel" attribute is not standard
conform in an <area> element!

But we can use the "alt" attribute instead <area
alt="lightbox_imagedescription" title="" >
Adding an image description after lightbox serves two purposes. First
you have a text displayed if the area image cannot be displayed or by
use of a screen reader, second you can use it to group your images in
lightbox.

All you need to do is add:

$$("area").filter(function(el) {
return el.alt && el.alt.test(/^lightbox/i);
}).slimbox({/* Put custom options here */}, null, function(el) {
return (this == el) || ((this.alt.length > 8) && (this.alt ==
el.alt));
});

to the Slimbox.scanPage = function()

On this page you can see it in action www.loehli.ch

Hopefully this helps some people

[Axel]
Reply all
Reply to author
Forward
0 new messages