title: JQuery Sub Selector question
body: <p>my html</p>
  
  <pre><code>&lt;div id="x"&gt;
    &lt;div id="x1"&gt;
      some text
      &lt;div&gt;other text&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="x2"&gt;just text&lt;/div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>my call</p>
  
  <p>I have this element than can be any jquery selector, 1 or more elements:</p>
  
  <pre><code>var x = $("#x");
  </code></pre>
  
  <p>now I NEED (this is a plugin who will discover inner elements like tabs) to navigate only thru the firsts DIV elements and not its childrends. I'm trying... </p>
  
  <pre><code>$.each($($("div"), x), function() {
    alert($(this).html());
  });
  </code></pre>
  
  <p>shows:
  1. some textother text
  2. other text
  3. just text</p>
  
  <pre><code>$.each($($("div"), x).siblings(), function() {
    alert($(this).html());
  });
  </code></pre>
  
  <p>shows:
  1. just text
  2. some textother text</p>
  
  <p>this is the most approximate, but I need in the correct order. any suggestion ? thanks</p>
  
  <p>ps. because it's a plugin I cant do this.</p>
  
  <pre><code>$("#x", "div....")
  </code></pre>
  
  <p>I need to do this</p>
  
  <pre><code>#(newselector, x)
  </code></pre>