title: How to add class to outer div which contains a particular inner class with jquery?
body: <p>How to add class to "outer" if there is a div with class "inner"?</p>
  
  <p>From</p>
  
  <pre><code>&lt;div class="outer"&gt;
    &lt;div class="inner&gt;
     blah blah
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;div class="outer newclass"&gt;
    &lt;div class="inner&gt;
     blah blah
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Please help. thanks guys.</p>