title: How to disable button if all the inputs don't needed to be filled?
body: <p>I have to disable button in my form, but not all the inputs are required. In my code, I have written which of the inputs need to be filled, but still I have to fill all the inputs in the form. How should I change that?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#billing_first_name, #billing_last_name, #billing_address_1, #billing_postcode, #billing_city, #billing_phone, #billing_email').bind('keyup', function dataFilled() {
    $('form &gt; input').keyup(function() {
      var empty = false;
      $('form &gt; input').each(function() {
        if ($(this).val() == '') {
          empty = true;
        }
      });
  
      if (empty) {
        $('#place_order').attr('disabled', 'disabled');
      } else {
        $('#place_order').removeAttr('disabled');
      }
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form&gt;
    Name&lt;br&gt;
    &lt;input type="text" id="billing_first_name" name="billing_first_name"&gt;&lt;br&gt; Surname&lt;br&gt;
    &lt;input type="text" id="billing_last_name" name="billing_last_name"&gt;&lt;br&gt; Company's Name (optional)&lt;br&gt;
    &lt;input type="text" id="billing_company" name="billing_company"&gt;&lt;br&gt; Street&lt;br /&gt;
    &lt;input type="text" id="billing_address_1" name="billing_address_1"&gt;&lt;br&gt; Postal code&lt;br&gt;
    &lt;input type="text" id="billing_postcode" name="billing_postcode"&gt;&lt;br&gt; City&lt;br&gt;
    &lt;input type="text" id="billing_city" name="billing_city"&gt;&lt;br&gt; Phone&lt;br&gt;
    &lt;input type="text" id="billing_phone" name="billing_phone"&gt;&lt;br&gt; E-mail&lt;br&gt;
    &lt;input type="text" id="billing_email" name="billing_email"&gt;&lt;br&gt;
    &lt;button type="submit" name="place_order" id="place_order" value="Buy" disabled="disabled"&gt;Buy&lt;/button&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>