I have 3 checkboxes and want to see that which checkbox is checked [vice-versa]. If Group1 is checked then it should return Group1:true and vice versa.
@Html.CheckBoxFor(m => m.Group1, new { @class = "chk",@id= "Group1" })
@Html.CheckBoxFor(m => m.Group2, new { @class = "chk", @id = "Group2"})
@Html.CheckBoxFor(m => m.Group3, new { @class = "chk", @id = "Group3"})
Script
$('.chk').change(function () {
var id = $(this).val();
$('#' + id).is(":checked");
});
it should return Group1:trueWhere do you want to return to?