You're better off creating an array of strings and appending the resulting piece of HTML to the DOM at the end of the success callback and out of the loop. Reflows and repaints are expensive in browsers, you should avoid them as much as possible.