Wednesday, February 5, 2014

Checkbox checked attribute add through Jquery

HTML



Jquery

$("#environment").each(function(){ $(this).change(function () { if ($(this).val() == "Non Security Device") { $('#cla_checkbox').prop('checked', true); } else{ $('#cla_checkbox').prop('checked', false); } }); });


No comments:

Post a Comment