title: jquery advanced selector construction
body: <p>I am new to using jquery, and I need a help with advanced jquery selectors. </p>
  
  <p>i need to select all h2, h3 and span tags, but not those that are descendants of div that are have class <strong>foo</strong>. best what i fugured out is this:</p>
  
  <pre><code>$("h2, h3, span").not("div.foo h2, div.foo h3, div.foo span")
  </code></pre>
  
  <p>i guess that i dont need to say that i dont like it. i guess i could also use </p>
  
  <pre><code>$("h2, h3, span").not("div.foo *") 
  </code></pre>
  
  <p>but that limits my possibilities to manipulate with it, for example, allowing h3 to be selected even in said divs while h2 still not. </p>
  
  <p>I would rather like to know what is and advanced way (if there is some) of combining selectors.  </p>