title: Disabling submit if no checkbox selected
body: <p>I am trying to implement a script to disable a submit button if nothing is checked but it does not seem to work if all boxes are unchecked after been checked.</p>
  
  <p>Please see below:</p>
  
  <pre><code>$('.obstructions .panel').on('change', function() {
  
    //Disable button if none selected
    var anyBoxesChecked = false;
    $('form input[type="checkbox"]').each(function() {
      if ($(this).is(":checked")) {
        anyBoxesChecked = true;
        $('.btn').prop('disabled', false);
      }
    });
  
    if (anyBoxesChecked == false) {
      $('.btn').prop('disabled', true);
    }
  
  });
  </code></pre>
  
  <p>Any help would be appreciated.</p>