title: Toggle enabled&disabled all inputs in div when chceckbox clicked
body: <p>I am trying to remove the attribute disabled at each input when the chceckbox is clicked. I was able to turn these inputs on but I have a problem with switching them back off.</p>
  
  <pre><code>     &lt;div class='single-service-&lt;?php echo $row["id"]; ?&gt;'&gt;
        &lt;input type='checkbox'&gt;
        &lt;label&gt;&lt;?php printf ("%s", $row["service_name"]); ?&gt;&lt;/label&gt;
        &lt;label&gt;Ilość:&lt;/label&gt;&lt;input type="number" name="quantity" value="&lt;?php echo $row["quantity"]; ?&gt;" placeholder='ILOŚĆ' disabled/&gt;
        &lt;label&gt;Cena netto:&lt;/label&gt;&lt;input type="number" name="net_price" value="&lt;?php echo $row["net_price"]; ?&gt;" placeholder='CENA NETTO' disabled/&gt;
      &lt;/div&gt;
  
  
      var checkboxes = document.querySelectorAll("input[type='checkbox']");
  
      for(var i=0; i &lt; checkboxes.length; i++) {
        checkboxes[i].addEventListener('click', function() {
          var div = this.parentNode;
          var x = div.childNodes;
          for(y=0; y &lt; x.length; y++) {
            x[y].disabled = false;
          }
        }, false);
      }
  </code></pre>