title: jQuery validation on rows with text input and select fields?
body: <p>I am a jQuery/JavaScript beginner and trying to create a spreadsheet-style form with validation so that, once information has been entered for any field in the row, all fields in that row should be required too.  <a href="https://stackoverflow.com/questions/23741848/jquery-validation-on-rows">This</a> post and one of the suggestions posted there were extremely helpful in terms of how to handle validation of text input fields in the row.  However, I also need to apply that validation logic to select fields in the row as well.  I've tried changing the settings in the .on() and .find() functions, but am having no luck.  How could this script (taken from the post above) be changed to handle the select fields in the row as well as the text input fields?  <a href="https://jsfiddle.net/L38m04jw/2/" rel="nofollow noreferrer">Here</a> is a demo with the row validation working for the text inputs, but not the select fields.  Thank you!</p>
  
  <pre><code>$("#mytable").on("input", "input", function(){
      var anySet = false,
          $cells = $(this).closest("tr").find("td input");
      $cells.each(function() {
          var somethingInCell = $(this).val().trim() !== '';
          anySet |= somethingInCell;
      });
      $cells.removeClass("has-error");
      if (anySet) {
          $cells.each(function() {
              if ($(this).val().trim() === '') {
                  $(this).addClass("has-error");
              }
          });
      }
  });
  </code></pre>