[html]
<div id="image">
<div id="loader">
<img id="loaderImage" src="assets/loader.gif" alt="loading..." />
</div>
<div id="loaded">
<img id="picture" src="" alt="" /><!--image in question-->
<div id="closeAll" onclick="closeAll();">X</div>
</div>
</div>
[/html]
the div "image" is hidden until a button is click, and the div "loaded" is hidden until a certain time.
the javascript in question:
Expand|Select|Wrap|Line Numbers
- var image = document.getElementById("image").style;
- var width = document.getElementById("picture").width;
- var height = document.getElementById("picture").height;
- document.getElementById("picture").style.width = width + "px";
- document.getElementById("picture").style.height = height + "px";
- height += 15;
- image.display = "block";
- image.width = width + "px";
- image.height = height + "px";
thanks in advance..