Nieuw lid |
|
Deze code over de sluitbutton kon ik vinden tussen al de junk in de js file, maar ik zie niet hoe die ervoor zorgt dat die in de hoek van de img staat...
<div id="lightbox">
<a href="#" onclick="hideLightbox(); return false;" title="Click anywhere to close image">
<img id="closeButton" />
<img id="lightboxImage" />
</a>
<div id="lightboxDetails">
<div id="lightboxCaption"></div>
<div id="keyboardMsg"></div>
</div>
</div>
// preload and create close button image
var imgPreloadCloseButton = new Image();
// if close button image found,
imgPreloadCloseButton.onload=function(){
var objCloseButton = document.createElement("img");
objCloseButton.src = closeButton;
objCloseButton.setAttribute('id','closeButton');
objCloseButton.style.position = 'absolute';
objCloseButton.style.zIndex = '200';
objLink.appendChild(objCloseButton);
return false;
}
imgPreloadCloseButton.src = closeButton;
<div id="lightbox"> <a href="#" onclick="hideLightbox(); return false;" title="Click anywhere to close image"> <img id="closeButton" /> <img id="lightboxImage" /> </a> <div id="lightboxDetails"> <div id="lightboxCaption"></div> <div id="keyboardMsg"></div> </div> </div> // preload and create close button image var imgPreloadCloseButton = new Image(); // if close button image found, imgPreloadCloseButton.onload=function(){ var objCloseButton = document.createElement("img"); objCloseButton.src = closeButton; objCloseButton.setAttribute('id','closeButton'); objCloseButton.style.position = 'absolute'; objCloseButton.style.zIndex = '200'; objLink.appendChild(objCloseButton); return false; } imgPreloadCloseButton.src = closeButton;
|