if(images[i]){
temp = new Image();
temp.src = 'images/offer/' +images[i];
ratio = temp.width / temp.height;
Du musst hier warten, bis das Bild geladen wurde, in jedem Browser. Das geht mit onload.
var temp = new Image();
temp.onload = function() {
alert(this.width);
};
temp.src = 'images/offer/' +images[i];
Da der IE den onload Event nicht feuert, wenn das Bild bereits im Cache ist musst du dir in dem Fall etwas überlegen, z.b.
var temp = new Image();
temp.onload = function() {
fertig(this);
};
temp.src = 'images/offer/' +images[i];
if(temp.complete) fertig(temp);
function fertig(bild){
alert(bild.width);
}
Struppi.