title: Using jquery find() to select input by class
body: <p>I have a script which validates each stage of a form and adds a tick or cross to each section if the validation is without errors or not.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>var error = 1;
  var hasError = false;
  $('.edit_artist').children(':nth-child(' + parseInt(step) + ')').find('input:not(button)').each(function() {
                  var $this = $(this);
                  var valueLength = jQuery.trim($this.val()).length;
                  if(valueLength == '') {
                      hasError = true;    
                  }
  </code></pre>
  
  <p>I dont want the validation to occur on all input fields, so I want to be able to validate inputs by class. Is there a way of finding inputs by class or would I need to go down another route to achieve this?</p>
  
  <p>Thanks</p>