DEV Community

Discussion on: Select All Checkboxes with jQuery

Collapse
 
wyattwong profile image
Wyatt Wong • Edited

How should I define "selectAll" ? I define the checkbox group as follows but I found the jQuery snippet didn't work.

<div id="myclass" >
<strong>My Class</strong><br />
<input type="checkbox" name="selectAll" value="All">All
<input type="checkbox" name="myclassType" value="A">A
<input type="checkbox" name="myclassType" value="B">B
<input type="checkbox" name="myclassType" value="C">C
</div>