This article applies to jQuery 1.4.4
The jQuery .replaceWith() method replaces a DOM-element and all of its children by another DOM-element. This function is ideal for use in Ajax applications.
The .replaceWith() method however internally uses the jQuery .remove() method which in Internet Explorer can be dramatically slow. There is a tric however to improve this performance radically by emptying the DOM-element first before removing it.
It enhanced my performance in IE at least 10 times!
Here's the line: