title: check all boxes checked when click on parent checkbox
body: <p>I have Parent1 and check box when i click on Parent1 check box all the child belongs to parent1 should to checked and  parent1 along with the checkbox should fadeout and again if i uncheck on any one of child  the parent1 along with the checkbox should reappear and the parent and child values are coming from database and they are in for each loop i.e first parent for each loop inside that child for each loop.</p>
  
  <p>My code is in <a href="http://jsfiddle.net/mrc4N/3/" rel="nofollow">http://jsfiddle.net/mrc4N/3/</a></p>
  
  <pre><code>&lt;div class="middle-right"&gt;
  &lt;ul class="mid-right-list"&gt;
  &lt;li&gt;&lt;span id="Parent1a"&gt;+ Parent1&lt;input name="parent" class="pc-box" type="checkbox"&gt;&lt;/span&gt;
          &lt;ul class="pa rplist"&gt;
  &lt;li value="1" class="parent1"&gt;- Child   1.1 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
  &lt;li value="2" class="parent1"&gt;- Child   1.2 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
  &lt;li value="3" class="parent1"&gt;- Child   1.3 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
              &lt;/ul&gt;
                &lt;/li&gt; 
  &lt;li&gt;&lt;span id="Parent2a"&gt;+ Parent2&lt;input name="parent" class="pc-box" type="checkbox"&gt;&lt;/span&gt;
      &lt;ul class="pb rplist"&gt;
  &lt;li value="1" class="parent2 c1"&gt;- Child 2.1 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
  &lt;li value="2" class="parent2 c2"&gt;-Child 2.2 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
  &lt;li value="3" class="parent2 c3"&gt;- Child    2.3 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;span id="Parent3a"&gt;+ Parent3&lt;input name="parent" class="pc-box" type="checkbox"&gt;&lt;/span&gt;
  &lt;ul class="pc rplist"&gt;
  &lt;li value="1" class="parent3 c1"&gt;-Child 3.1 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
  &lt;li value="2" class="parent3 c2"&gt;- Child    3.2 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
      &lt;li value="3" class="parent3 c3"&gt;- Child    3.3 &lt;input class="cc-box" name="child" type="checkbox"&gt;&lt;/li&gt;
      &lt;/ul&gt;               
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Thanks in advance</p>