hi
I put 2 textbox and 2 checkbox in page:
1-Txtmatn(textbox) 1-ch1(checkbox)
2-Txtsecond(textbox) 2-ch2(checkbox)
for Txtmayn and ch1 I use below code:
<script type="text/javascript">
$(function () {
$("#Txtmatn").attr("disabled", "disabled");
ApplyCss();
// if checked.
$('input[type=checkbox][id*=Chad]').on('ifChecked', function (event) {
$("#Txtmatn").removeAttr("disabled");
$("#Txtmatn").focus();
});
// if uncheckd.
$('input[type=checkbox][id*=Chad]').on('ifUnchecked', function (event) {
$("#Txtmatn").attr("disabled", "disabled");
});
});
function ApplyCss() {
$('input').iCheck({
checkboxClass: 'icheckbox_square-red',
radioClass: 'iradio_square-red',
increaseArea: '20%' // optional
});
};
//On PostBack
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyCss();
$('input[type=checkbox][id*=Chad]').on('ifChecked', function (event) {
$("#Txtmatn").removeAttr("disabled");
$("#Txtmatn").focus();
});
// if uncheckd.
$('input[type=checkbox][id*=Chad]').on('ifUnchecked', function (event) {
$("#Txtmatn").attr("disabled", "disabled");
});
}
});
};
</script>
I want use above code for:
2-Txtsecond(textbox) 2-ch2(checkbox)
how I can use above code for two text box and two checkbox?
Best regards
neda