title: JavaScript/jQuery - how to find first of each undetermined class within parent div
body: <p>I'm pulling in data from a SharePoint list using SPServices. Each row from the list will be slotted into the container div with a class that corresponds to the month and year data from the list, like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="child 07-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 06-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 06-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 11-2012"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 11-2012"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to write a script (preferably jQuery rather than proper JavaScript as I'm more familiar with that) that will find the first of each class and add another div before it, so that it ends up like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="header"&gt;July 2013&lt;/div&gt;
    &lt;div class="child 07-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="header"&gt;June 2013&lt;/div&gt;
    &lt;div class="child 06-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 06-2013"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="header"&gt;November 2012&lt;/div&gt;
    &lt;div class="child 11-2012"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="child 11-2012"&gt;
      &lt;p&gt;Some content&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I know I could write something like this:</p>
  
  <pre><code>function addHeaders(){
    $('.07-2013').before('&lt;div class="header"&gt;July 2013&lt;/div&gt;');
    $('.06-2013').before('&lt;div class="header"&gt;June 2013&lt;/div&gt;');
    etc...
  }
  </code></pre>
  
  <p>But the problem is that I don't want to define each class in the script, because data will be added to the SharePoint list constantly and I want to future-proof it so that the author can update the SharePoint List and the script will handle the data automatically.</p>
  
  <p>So, is there any way to ambiguously find the first instance of each class within the container div?</p>