title: jQuery find closest of the given classes
body: <p>I need to find the <code>.closest()</code> ancestor with any one of the given class.</p>
  
  <pre><code>jQuery("#gid").closest(".ui-tabs,.tab-pane,.jomsTabsContent");
  </code></pre>
  
  <p>What I want here, is which ever of the given classes is the closest one, I need to select that.</p>
  
  <p>So for the following eg.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="foo"&gt;
   &lt;div class="bar"&gt;
    &lt;div class="monkey"&gt;
      &lt;div id="gid"&gt;
      &lt;div&gt;
    &lt;div&gt;
   &lt;div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>jQuery("#gid").closest(".foo,.bar,.monkey");
  </code></pre>
  
  <p>I want the above to select (only) the <code>.monkey</code> div.</p>
  
  <p>PS: <em>I know the above isn't correct syntax for what I'm 'looking for', but I am demonstrating what I am looking for.</em></p>