title: Get class from div inside an li and add to same li
body: <p>Get class from div inside an li and add to the same li.</p>
  
  <p>The list items look similar to this:</p>
  
  <pre><code>&lt;li class="original"&gt;
  &lt;div id="one" class="text"&gt;foo&lt;/div&gt;
  &lt;div id="two" class="photo"&gt;foo&lt;/div&gt;
  &lt;div id="three" class="video"&gt;foo&lt;/div&gt;
  &lt;/li&gt;
  
  &lt;li class="original"&gt;
  &lt;div id="one" class="text"&gt;foo2&lt;/div&gt;
  &lt;div id="two" class="photo"&gt;foo2&lt;/div&gt;
  &lt;div id="three" class="video"&gt;foo2&lt;/div&gt;
  &lt;/li&gt;
  
  ...
  </code></pre>
  
  <p>I need to grab the class from each of the list item's divs with an id of "three" and add it to the parent li's class. So, after the code runs the list will look like this:</p>
  
  <pre><code>&lt;li class="original video"&gt;
  &lt;div id="one" class="text"&gt;foo&lt;/div&gt;
  &lt;div id="two" class="photo"&gt;foo&lt;/div&gt;
  &lt;div id="three" class="video"&gt;foo&lt;/div&gt;
  &lt;/li&gt;
  
  &lt;li class="original text"&gt;
  &lt;div id="one" class="video"&gt;foo2&lt;/div&gt;
  &lt;div id="two" class="photo"&gt;foo2&lt;/div&gt;
  &lt;div id="three" class="text"&gt;foo2&lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I tried something like this but it only updates the first list item:</p>
  
  <pre><code>$("#three").each(function(i) { 
      var newclass = $(this).attr("class");                   
     $(this).parent().addClass(newclass);
  });
  </code></pre>
  
  <p>Thanks in advance for your help!</p>