13 December 2011 Nice article. Last example can perform even better if you use array joining instead of string concatenation. var arr = [reallyLongArrayOfImageURLs], tmp = []; $.each(arr, function(count, item) { tmp.push(’<li><img src=”‘item’”></li>’); }); $(’#imgList’).append(tmp.join(”“));
Nice article.
Last example can perform even better if you use array joining instead of string concatenation.
var arr = [reallyLongArrayOfImageURLs], tmp = [];
$.each(arr, function(count, item) { tmp.push(’<li><img src=”‘item’”></li>’);
});
$(’#imgList’).append(tmp.join(”“));