title: jQuery closest exclude self
body: <p><code>closest()</code> will get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. But I want to know if there is any way to get the result excluding itself (I mean just get the parents of it).</p>
  
  <p>Let me take a example. Please review it.</p>
  
  <pre><code>&lt;div id='div1' class="container"&gt;
      &lt;div id="div2" class="container"&gt;
          &lt;!--many nested div.container as it directly or indirectly children --&gt;
      &lt;/div&gt;
      &lt;div id="div3" class="container"&gt;
          &lt;!--many nested div.container as it directly or indirectly children --&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  $(function() {
  
      $('div.container').on('mouseover', function(e){
          //I only want to select the first parent with the class container.
          //closest include the this element. 
          console.log($(this).closest('.container').attr('id'));
      });
  });
  </code></pre>