I created this jQuery to Enable/Disable child Form Elements inside the asp.net panel this script will enable edit form but it will not Disable it after i click for second time can someone help me ?
<script type="text/javascript">
$(function () {
//creating toggle
$("#check").button();
$("[id$='check']").data('isenabled', true); //enabled assumption
//disabled all input form
$("[id$=p_taskInfo]").children().prop("disabled", "disabled");
$("input[name='check']").click(function () {
var currentState = $(this).data('isenabled');
if (currentState) {
$("[id$=p_taskInfo]").children().removeProp("disabled");
}
else {
$("[id$=p_taskInfo]").children().prop("disabled", "disabled");
}
$(this).data('isenabled', !currentState);
}); //EOF click function
});//EOF function
</script>