After JQuery1.6, the appearance of prop, so that 1.6 of the full selection of anti-selection effect all failed. The following is the revised version:
Select all anti-selection effect:
$ (". CheckBox"). Click (function () { $ (' input[type=checkbox] '). Prop (' Checked ', $ (this ). Prop (' checked '); });
Find the JQ code for the selected item:
$ ("input:[type= ' checkbox '][checked]")
JQ1.6 The following selection of the reverse selection effect:
if($( This). attr ("checked") = =true) { $("Input:[type= ' checkbox ']"). each (function () { //$ ("#IsSettle"). Val ("true");$( This). attr ("Checked", "checked"); }); } Else { $("Input:[type= ' checkbox ']"). each (function () { //$ ("#IsSettle"). Val ("false");$( This). Removeattr ("Checked"); });
JQ1.6 below to find the code for the selected item:
$ ("input:[type= ' checkbox '][checked]")
Jquery 1.8 Select All deselect remove selected implementation