I ran yesterday in a problem with a jquery-selector I assigned to a variable and it\'s driving me mad.
Here is a jsfiddle with testcase:
If you use remove() it will remove only a part of the DOM but not all the children or related, instead if you use empty() on the element the problem is gone.
remove()
empty()
E.G.:
$('#parent .child).find('#foo').empty();
Maybe it can be useful to someone!