How to check if all of the checkbox are checked
<p>How can I check if all of my checkboxes are checked or unchecked with jquery,I have child and grandchild input elements-</p>

<p>codepen setup : <a href="http://codepen.io/Assert/pen/BLBjpk" rel="nofollow">http://codepen.io/Assert/pen/BLBjpk</a></p>

<pre><code>&lt;ul id="treeList"&gt;
  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; mCRC
  &lt;ul&gt;
  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; STIVARGA Efficacy
    &lt;ul&gt;
      &lt;li&gt;
        &lt;input type="checkbox" name="selectedRole"&gt; Long-Term Responders
      &lt;/li&gt;
      &lt;li&gt;
        &lt;input type="checkbox" name="selectedRole"&gt; STIVARGA in Clinical Practice
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; STIVARGA AE Management
  &lt;/li&gt;

  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; Dosing
  &lt;/li&gt;
  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; Patient Communication
  &lt;/li&gt;
  &lt;li&gt;
    &lt;input type="checkbox" name="selectedRole"&gt; Case Studies
  &lt;/li&gt;
&lt;/ul&gt;

&lt;li&gt;
  &lt;input type="checkbox" name="selectedRole"&gt; GIST
&lt;/li&gt;
</code></pre>

<p></p>