Skip to content

24 ways to impress your friends

Vote down?

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(”“));