MediaWiki:Imagemap-Hightlight.js: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 100: Zeile 100:
// pack them all TIGHTLY in a newly minted "relative" div, so when page chnage
// pack them all TIGHTLY in a newly minted "relative" div, so when page chnage
// (other scripts adding elements, window resize etc.), canvas and imagese remain aligned.
// (other scripts adding elements, window resize etc.), canvas and imagese remain aligned.
var div = $('<div>').css({position: 'relative', width: w + 'px', height: h + 'px', border: '3px dashed red'});
var div = $('<div>').css({position: 'relative', width: w + 'px', height: h + 'px'});
img.before(div); // put the div just above the image, and ...
img.before(div); // put the div just above the image, and ...
div.append(bgimg) // place the background image in the div
div.append(bgimg) // place the background image in the div