title: enable disable textbox inside a table when checkbox checked
body: <p>I am using jQuery. How to enable or disable textbox inside a table when checkbox checked. 
  This is my edit.cshtml.</p>
  
  <pre><code>   &lt;table id="scDetails" class="dataTable"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;RItem&lt;/th&gt;
                      &lt;th&gt;IChecked&lt;/th&gt;
                      &lt;th&gt;Notes&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  @foreach (var fback in Model.Fbacks)
                  {
                      &lt;tr&gt;
                          &lt;td @Html.DisplayFor(m =&gt; fback.RItem)&lt;/td&gt;
                          &lt;td&gt;@Html.CheckBoxFor(m =&gt; fback.IChecked)&lt;/td&gt;
                          &lt;td&gt;@Html.TextBoxFor(m =&gt; fback.Notes)&lt;/td&gt;
                      &lt;/tr&gt;
                  }
              &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>What i have tried is:</p>
  
  <pre><code> $('td :checkbox').change(function () {
              var parentTx = $(this).closest('tr').find(input[type = "text"]);
              if (this.checked) {
                  parentTx.attr("disabled",false);
              } else {
                  parentTx.attr("disabled", true);
              }
          });
  </code></pre>
  
  <p>Where am doing wrong? I dont want to use any classes on the controls to achieve this.</p>