Tach beisammen,
ich hoffe ich bin hier in der richtigen Rubrik mit meiner Frage.
Ich würde gern eine Imagemap via Inhaltselement HTML einbauen und die dort verlinkten Flächen sollen ein Bild in der Mediabox öffnen. Leider hört die Mediabox nur auf <a rel="lightbox"> und nicht <area rel="lightbox"> Elemente. Kann mir jemand sagen wo ich dieses Element im JS der Mediabox hinzufügen kann? Finde aktuell nichts in der mediabox_src.js
Es gibt hier eine Funktion die wohl die Elemente definiert....nur check ich die Beschreibung nicht ganz.
Code:
Elements.implement({
/*
options: Optional options object, see Mediabox.open()
linkMapper: Optional function taking a link DOM element and an index as arguments and returning an array containing 3 elements: the image URL and the image caption (may contain HTML)
linksFilter: Optional function taking a link DOM element and an index as arguments and returning true if the element is part of the image collection that will be shown on click, false if not. "this" refers to the element that was clicked. This function must always return true when the DOM element argument is "this".
*/
Im moo_mediabox.tpl wird außerdem folgender Scan aufgerufen
Code:
Mediabox.scanPage = function() {
var links = $$("a").filter(function(el) {
return el.rel && el.rel.test(/^lightbox/i);
});
$$(links).mediabox({/* Put custom options here */}, null, function(el) {
var rel0 = this.rel.replace(/[[]|]/gi," ");
var relsize = rel0.split(" ");
return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
});
};
Genau da müsste noch das "area" mit rein.
Wäre dankbar für Hilfe.
Gruß
Lesezeichen