document.getElementById('bigimg').style.maxHeight = maxHeight + "px";
document.getElementById('bigimg').style.maxWidth = maxWidth + "px";
document.getElementById('bigimg').onload = function () {
- var icon = document.getElementById('bigimg_close');
- icon.style.top = this.offsetTop;
- icon.style.left = this.offsetLeft + this.clientWidth - icon.clientWidth;
-
var heightRatio = this.clientHeight / parseInt(this.style.maxHeight);
var widthRatio = this.clientWidth / parseInt(this.style.maxWidth);
if (heightRatio > 1 || widthRatio > 1) {
}
}
+ var icon = document.getElementById('bigimg_close');
+ icon.style.top = this.offsetTop;
+ icon.style.left = this.offsetLeft + this.clientWidth - icon.clientWidth;
+
};
document.getElementById('bigimg').src = href;
},