jQuery select items which parents are not of a given class
<p>how can select all nodes with class "myClass" whose parent nodes don't have class "myClass". </p>

<p>for example, i have following HTML:</p>

<pre><code>&lt;div class="myContainer"&gt;
    &lt;div class="myClass" id="d1"&gt; 
        &lt;div class="myClass" id="d2"&gt;&lt;/div&gt;
        &lt;div class="myClass" id="d4"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="myClass" id="d3"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>and i want to get a list of elements with ids "d1" and "d3"</p>

<p>actually, i'm trying to write a code that converts HTML from that example to a list with tabulations, such as:</p>

<pre><code>d1
  d2
  d4
d3
</code></pre>

<p>(there can be more descedant nodes)</p>
