title: How can I use jQuery find() with a depth limit?
body: <p>I need to use jquery's "find" selector to get all divs having the class "field_container". The problem is that I can't go too deep in the DOM tree.</p>
  
  <p>Here is my simplified HTML structure:</p>
  
  <pre><code>&lt;div id='tab_0'&gt;
  
   &lt;div id='form_content'&gt;
  
    &lt;div class='field_container'&gt;
     &lt;span&gt;Div 1&lt;/span&gt;
     &lt;div class='field_container'&gt;
     &lt;span&gt;Div 1.1&lt;/span&gt;
     &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class='field_container'&gt;
     &lt;span&gt;Div 2&lt;/span&gt;
    &lt;/div&gt;
  
    &lt;div class='field_container'&gt;
     &lt;span&gt;Div 3&lt;/span&gt;
    &lt;/div&gt;
  
   &lt;/div&gt; &lt;!-- Closing form_content div//--&gt;
  
  &lt;/div&gt; &lt;!-- Closing tab_0 div//--&gt;
  </code></pre>
  
  <p>I have a initial reference to the "tab_0" div. Starting from it, I need to obtain all "field_container" divs, excluding child "field_containers".</p>
  
  <p>I have tried this:</p>
  
  <pre><code>$('#tab_0').children('.field_container') -&gt; doesnt work, because the "field_container" divs arent direct children.
  
  $('#tab_0').find('.field_container') -&gt; doesnt work, because "Div 1.1" is also returned. I only need the first-level ones (Div1, Div2, Div3).
  </code></pre>
  
  <p>I can't change my initial reference, it has to be "tab_0".</p>