Ik zou graag willen hebben dat hij op mijn portals alle plaatjes resized naar bijv 300*200 en dat hij alle andere plaatjes overal op het forum resized naar 580 zoals hieronder staat.... Is dit mogelijk?
Ook resized hij niet in IE! Hoe komt dit en wat kan ik er aan doen zodat hij het wel doet? Of doet hij het bij anderen wel?
Dit is de code:
Code: Selecteer alles
<!-- resize images by Gert en Hieronymus. http://gathering.tweakers.net/forum/list_messages/826648///Images,resizen,javascript -->
<style type="text/css">
img[onload] {
max-width: 580px;
}
img.resized {
border: 2px dashed red;
cursor: pointer;
cursor: hand;
}
</style>
<script type="text/javascript">
var maxWidth = 580;
function scaleImage(im) {
if (typeof im.naturalWidth == 'undefined') im.naturalWidth = im.width;
if (im.naturalWidth > maxWidth) {
im.width = maxWidth;
im.style.maxWidth = im.naturalWidth + 'px';
im.className = 'resized';
im.title = 'Klik voor originele grootte';
im.onclick = unscaleImage;
}
}
function unscaleImage() {
if (this.width == maxWidth) {
this.width = this.naturalWidth;
this.style.borderWidth = '0px';
this.title = 'Klik om te verkleinen';
} else {
this.width = maxWidth;
this.style.borderWidth = '2px';
this.title = 'Klik voor originele grootte';
}
}
</script>