How does one identify an empty element using jQuery that might contain a comment tag?
<p>I'm trying to identify an empty element that might or might not contain a comment tag and/or white space.</p>

<p>The following HTML structure is common place in the environment I'm working with:</p>

<pre><code>&lt;div class="container container-no-title"&gt;
  &lt;div id="dnn_ctr6735_ContentPane" class="container-padding DNNAlignright"&gt;
    &lt;!-- Start_Module_6735 --&gt;
    &lt;div id="dnn_ctr6735_ModuleContent"&gt;
      &lt;!-- End_Module_6735 --&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>My initial jQuery was:</p>

<pre><code>$('.container-padding &gt; div').each(function() {
  if ($(this).is(":empty")) {
    $(this).parent('.container-padding').remove();
  };
});
</code></pre>

<p>But this doesn't account for whitespace or comment tags. I found other questions that addressed whitespace, but nothing that addresses comment tags, and I'd really like to keep this little snippet of jQuery simple.</p>

<p>Cheers,
Steve</p>
