I am dealing with tables nested inside divs, and some of them are either empty, contain a single space, or have a single character like "-", which I refer to as EMPTY DIVs. What is the best way to use JavaScript to remove these EMPTY DIVs upon loading the document?
An example of my EMPTY DIVs looks like this:
<div class="extra">
<table>
<tr>
<td></td>
</tr>
</table>
</div>
or
<div class="extra">
<table>
<tr>
<td>-</td>
</tr>
</table>
</div>