I've done a little messing around and have found that something is wrong with: $(this).append( "<div id='" + title + "' class='edit_dialog'>" ).append( $(".edit_accordion") ).append( "</ div>" );
It only inserts the div tag and "skips" or looses the middle append data. The div tag is also converted into a single tag, such as <div id='title' class='edit_dialog' />