Remove elements before they are added to the DOM : <p>A series of <code>.cell</code> elements are created on <code>document</code> load.
They are only useful if also an <strong><code>img</code></strong> is added within them.
I need to keep them from being created because they are linked to the creation of other <code>li</code> elements.</p>

<p>Thank you.</p>

<p>Source Code:</p>

<pre><code>&lt;div class="main-container"&gt;
  &lt;div class="parent-container"&gt;

       &lt;div class="cell"&gt;     !always added
          &lt;div class="container"&gt;     !always added
             &lt;div class="screen"&gt;&lt;/div&gt;     !always added
             &lt;img&gt; **!If added**
          &lt;/div&gt;                                            
       &lt;/div&gt;

  &lt;/div&gt;
  &lt;li&gt;Created even if not needed&lt;/li&gt;
&lt;/div&gt;
</code></pre>
