It is right. The remove () method does not remove items. In jQuery in Action, it says, βNote that, like many other jQuery commands, the completed set is returned as a result of this command. Elements removed from the DOM still reference this set (and therefore not yet for garbage collection) and can be additionally used when using other jQuery commands ... "I searched, and this does not look like jQuery, which actually removes elements. Therefore, I think you should do this using the old JavaScript DOM functions.
Fabrix
source share