Couldn't all this be done with a string and a single append or after? It is costly to do repeated jQuery object creates and appends. Much more efficient to build the HTML in a string then insert it once.