i'm using the below jquery script to disable user from selecting more than 1 check box of same name at a time
$("input:checkbox").click(function () {
if ($(this).is(":checked")) {
var group = "input:checkbox[name='" + $(this).attr("name") + "']";
$(group).prop("checked", false);
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
});
And here is the check boxes
<div class="ChekMarkWrap">
<input id="chkFilm_4" type="checkbox" name="four" style="margin-left:2px;" /><br />film
</div>
<div class="ChekMarkWrap">
<input id="chkTv_4" type="checkbox" name="four" /><br />tv
</div>
<div class="ChekMarkWrap">
<input id="chkWeb_4" type="checkbox" name="four" /><br />web
</div>
<div class="ChekMarkWrap">
<input id="chkStage_4" type="checkbox" name="four" /><br />stage
</div>
It works well and good until i add a new check box dynamically.i'm binding the above jquery script on document.ready()
<radio>element, which is designed to do this?