Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery groupwise "Select All" checkbox
    text
    copied!<p>I need your help to resolve one of my issue. I have a Product list with me with Checkboxes. </p> <p>Requirement is that if the checkbox of the group head is selected then all the checkboxes inside that should be selected. If after that someone deselect one, then it should removed from the grouphead checkbox.</p> <p>Here is my code</p> <pre><code>&lt;ul id="productFilter"&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;List1&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;Product 1&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="107A-10" type="checkbox" /&gt;&lt;label for="107A-10"&gt;107A-10&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;input id="107A-11" type="checkbox" /&gt;&lt;label for="107A-11"&gt;107A-11&lt;/label&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;Product 2&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="BFPT" type="checkbox" /&gt;&lt;label for="BFPT"&gt;BFPT&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;input id="DEV831" type="checkbox" /&gt;&lt;label for="DEV831"&gt;DEV831&lt;/label&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;List2&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;Product 3&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="020" type="checkbox" /&gt;&lt;label for="020"&gt;020&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;input id="025" type="checkbox" /&gt;&lt;label for="025"&gt;025&lt;/label&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;input id="pr3" type="checkbox" /&gt;&lt;h3&gt;Product 4&lt;/h3&gt; &lt;ul class="secLevel"&gt; &lt;li&gt;&lt;input id="1A2" type="checkbox" /&gt;&lt;label for="1A2"&gt;1A2&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;input id="1A4" type="checkbox" /&gt;&lt;label for="1A4"&gt;1A4&lt;/label&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload