title: how to Enable/Disable asp panel and children using jquery
body: <p>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 ?  </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
          $(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 
      &lt;/script&gt;
  </code></pre>