Checkbox ShowHide Disable
Hi all,
I've three controls
1- CheckBox1
2- TextBox1
3- DropDownList1
now when the CheckBox1 is checked TextBox1 should be visible and DropdownList1 should be disable
- $(document).ready(function () {
showHide("CheckBox1", "TextBox1")
showHide("CheckBox2", "TextBox2");
showHide("CheckBox3", "TextBox3");
});
function showHide(Selector1, Control1, Selector2, Control2, Selector3, Control3) {
$("#" + Selector1).change(function () {
$("#" + Control1).toggle($(this).prop("checked"))
});
$("#" + Selector2).change(function () {
$("#" + Control2).toggle($(this).prop("checked"))
});
$("#" + Selector3).change(function () {
$("#" + Control3).toggle($(this).prop("checked"))
});
}
Thanx in advance