I have a checkbox and if I tick it I want a textfield to become enabled (disabled as default) and when I untick the the checkbox I want it to become disabled again.
show and hide a textbox(#otherSection2) for entering other options when last checkbox in a rendered table(#CheckBoxListList) of asp:CheckBoxList control is selected
$("#CheckBoxListList input[type='checkbox']:last").on("click", function () {
if ($(this).is(":checked")) {
$("#otherSection2").show();
} else {
$("#otherSection2").hide().find("input").val(null);
}
});