Check if an element doesn't exist and append it
<p>I want select all items that haven't an IMG tag and append it. I can do that:</p>

<p>How can i do that?</p>

<pre><code>  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
    &lt;div class="someDummydiv"&gt;&lt;/div&gt; 
    &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
 &lt;/div&gt;
</code></pre>

<p>Result --></p>

<pre><code>  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
  &lt;div class="test"&gt;
     &lt;div class="someDummydiv"&gt;&lt;/div&gt;
     &lt;img src="try.gif" /&gt;
  &lt;/div&gt;
</code></pre>

<p>Thank you very much</p>
