title: Using jQuery NOT selector to exclude elements with particular children.
body: <p>I have a function that appends some HTML to an element. It may get called more than once, so I only want it to append the HTML to elements that haven't already had the HTML added.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;div class="divToAppendTo"&gt;&lt;/div&gt;
  &lt;div class="divToAppendTo"&gt;&lt;span class="myAppendedMarkup"&gt;&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>As such, I'd like to select all .divToAppendTo that don't have an immediate child of .myAppendedMarkup</p>
  
  <p>My stab at it doesn't seem to work:</p>
  
  <pre><code>$(".divToAppendTo:not(&gt;span.myAppendedMarkup)")
  </code></pre>
  
  <p>It always appends when I call it (thereby duplicating the content). </p>