title: Enable input field after checkbox is checked in list of checkboxes
body: <p>I have a list of data getting from database, and i want to enable input field on checked checkbox. However its working only with the first line. Here is HTML code:</p>
  
  <pre><code>&lt;?php
      require_once('inc/config.php');
      include 'verification/verify_form_details.php';
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;getElementById example&lt;/title&gt;
    &lt;script type="text/javascript" src="js/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;?php 
          $result2 = getProcessID();
      ?&gt;
      &lt;label&gt;Process: &lt;small style="color:red;"&gt;*&lt;/small&gt;             
      &lt;?php 
          while ($row = mysql_fetch_array($result2))
          {
              $row[0] = cleanOutputData($row[0]);
      ?&gt;      
      &lt;div&gt;       
          &lt;label&gt;
          &lt;input type="checkbox" class="checkbox" name="process[]" id=&lt;?php echo $row[0] ?&gt;  value=&lt;?php echo $row[0]?&gt; /&gt;&lt;?php echo $row[0] ?&gt;
          &lt;/label&gt;                                        
  
          &lt;label&gt;
          &lt;input type="text" class="field" disabled name="number[]" id=&lt;?php echo $row[0] ?&gt; /&gt;
          &lt;/label&gt;
  
      &lt;/div&gt;
      &lt;?php
          }
          mysql_free_result($result2);
      ?&gt;
      &lt;/label&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And javascript function:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function () {
              $('.checkbox').change(function() {
                  $('.field').attr('disabled',!this.checked)
              });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any ideas how i can do it? Thank you</p>