Hi,
I have this following code
$(function () {
$.post("fetch_data.php?url="+$('#url').val(), { }, function(response){
var arrValues = [ "path/to/img1", "path/to/img2", "path/to/img3", "path/to/img4" ]; //output from php
var img = new Image();
$.each(arrValues, function( intIndex, objValue ) {
img.src = objValue;
img.onload = function() {
alert('height: ' + img.height + ' width: ' + img.width);
}
});
});
});
I am new in javascript/jquery, this code only return last("path/to/img4") height/width of image.
How do i make it return all image and width of the array?