Loading and appending images progressively
问题 I have an issue I can't get over. I made a simple jQuery album gallery and I have this function: function loadAlbum (index) { for (var j=1; j < xmlData[index].length; j++) { var img = new Image(); $(img).load(function() { $(this).hide(); $('#album'+index+' .photoContainer').append(this); $(this).fadeIn(); }) .error(function(){ //alert("Could not load one or more photo!"); }) .attr({ 'src': xmlData[index][j], 'id': 'img'+index+j, 'class': 'photoFrame', 'width': newW, 'height': newH }) .css({