I have a problem with unchecking a checkbox. Have a look at my jsFiddle, where I am attempting:
checkbox
$(\"#check2\").attr(\"checked\", true); <
$(\"#check2\").attr(\"checked\", true);
In some case you can use this:
$('.myInput').get(0).checked = true
For toggle you can use if else with function