Advertisement
matriphe

Simple Toggle Checkboxes on/off in Jquery

Dec 25th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#checkAll").click(function(){
  2.     $(".chk").prop("checked",this.checked);    
  3. });
  4. // this is optional
  5. $(".chk").click(function(){
  6.     $("#checkAll").prop("checked",false);
  7. });
  8. // required jQuery 1.6.x above
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement