title: add class if check box is checked and assign a class to it's parent div using jquery
body: <p>I need to add a class to a parent div of checked checkboxes, for example on click of button I want to check the checked check boxes inside the corresponding parent div, when there is a checked value, a new class should be added to its parent div.
  e.g HTML code is</p>
  
  <pre><code>&lt;div class="parent"&gt;
      &lt;input type="checkbox" name="a" /&gt;
      &lt;input type="checkbox" name="b" /&gt;
  &lt;/div&gt;
  &lt;div class="parent"&gt;
      &lt;input type="checkbox" name="c" /&gt;
      &lt;input type="checkbox" name="d" /&gt;
  &lt;/div&gt;
  &lt;button&gt;Add Class to parent div&lt;/button&gt;
  </code></pre>