title: jQuery - Check if a container div has a child with a specified attribute value
body: <p>I want to be able to check if a container div has a child in it with an attribute of a particular value and also how many instances exist.</p>
  
  <p>For example, if I had the following HTML: </p>
  
  <pre><code>&lt;div class='container'&gt;
      &lt;div class='child' myattr='myattrvalue1'&gt;DIV CONTENTS&lt;/div&gt;
      &lt;div class='child' myattr='myattrvalue2'&gt;DIV CONTENTS&lt;/div&gt;
      &lt;div class='child' myattr='myattrvalue3'&gt;DIV CONTENTS&lt;/div&gt;
      &lt;div class='child' myattr='myattrvalue3'&gt;DIV CONTENTS&lt;/div&gt;
      &lt;div class='child' myattr='myattrvalue3'&gt;DIV CONTENTS&lt;/div&gt;
      &lt;div class='child' myattr='myattrvalue4'&gt;DIV CONTENTS&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would like  a jquery line that that would be able to find if any div with class "child" in $(".container") has an attr of "myattr" and a value of "myattrvalue3".  I would also like to be able to determine how many instances of such a child exists, which would be 3 instances of the child with myattr='myattrvalue3' in this example.</p>