Enable disable asp.net textbox using checkbox checked property in jQuery
$(document).ready(function () {
//On page load check either text box is enable or disable
$('txtPedalPulseRight').prop("disabled", !$( 'chkPedalPulseRIghtNoScore').is(':checked'));
// Attach event on check box
$('chkPedalPulseRIghtNoScore').change(function () {
$('txtPedalPulseRight').prop("disabled", !$(this).is(':checked'));
});
});
//On page load check either text box is enable or disable
$('txtPedalPulseRight').prop("disabled", !$( 'chkPedalPulseRIghtNoScore').is(':checked'));
// Attach event on check box
$('chkPedalPulseRIghtNoScore').change(function () {
$('txtPedalPulseRight').prop("disabled", !$(this).is(':checked'));
});
});
No comments:
Post a Comment