title: jQuery Determine if a matched class has a given id
body: <p>What is jQuery has id equivalent of the following statement?</p>
  
  <pre><code>$('#mydiv').hasClass('foo')
  </code></pre>
  
  <p>so you could give a class name and check that it contains a supplied id.</p>
  
  <p>something like:</p>
  
  <pre><code>$('.mydiv').hasId('foo')
  </code></pre>