How can I use jquery to remove a SPECIFIC div that has no children (at least no children that isn\'t whitespace). E.g.
some cont
I went with:
$('#outer > div').filter(function (index) {
return $(this).children().length < 1;
}).remove();
This says:
Sadly, this will remove the div if it contains text, which is probably not what the original poster would have wanted. Plain text doesn't count as a child.