title: javascript/jquery select all child elements inside a parent element
body: <p>I have a bunch of child elements that are uniquely identified within a parent div.  I want to know if there's a way in jQuery (or javascript) to capture all of them?  The number of children in the parent div is arbitrary, meaning it could be any number for each div.  For example:</p>
  
  <pre><code>&lt;div class="parent1"&gt;
     &lt;span class="child1"&gt;some text here&lt;/span&gt;
     &lt;span class="child2"&gt;some other text&lt;/span&gt;
     ...
     &lt;span class="child49"&gt;yet more text&lt;/span&gt;
     &lt;span class="something_else"&gt;other text i don't want to select&lt;/span&gt;
  &lt;/div&gt;
  &lt;div class="parent2"&gt;
     &lt;span class="child1"&gt;some text&lt;/span&gt;
     &lt;span class="child2"&gt;some text&lt;/span&gt;
     ...
     &lt;span class="child120"&gt;some text&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So considering the above example, how do I get ALL the children (<code>.child1</code> through <code>.child49</code>) within the class <code>parent1</code>?</p>
  
  <p>I know that doing the following will work in jQuery (using multiple selector):</p>
  
  <pre><code>$(".child1, .child2, ..., .child49").css("background","red");
  </code></pre>
  
  <p>But is there a better way?  I won't always know how many children are in each parent.</p>
  
  <p>EDIT: also, I might have other children in the parent with a different class name that I DO NOT want to select; I specifically want to select all the "child*" classes.</p>