title: function called inside form submit gets updated values on first click and never updates after that
body: <p>I'm trying to validate form elements on form submit, I have made a function for validation purpose which is working fine on elements blur event, when i use same function again inside form submit and trigger blur event for rechecking values in form elements, the function called inside submit works only on first click if there were no errors, but when I update values in fields, the submit function never updates.</p>
  
  <p>Please help me out, here is my code</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form action="#" method="post" class="contact-form"&gt;
      &lt;div class="form-gp"&gt;
        &lt;textarea type="text" class="form-elem msg" placeholder="Type your message to the agent"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
    &lt;div class="form-gp"&gt;
      &lt;input type="text" class="form-elem name" placeholder="First Name"&gt;
    &lt;/div&gt;
    &lt;div class="form-gp"&gt;
      &lt;input type="text" class="form-elem phone" placeholder="Phone"&gt;
    &lt;/div&gt;
    &lt;input type="submit" class="btn btn-submit" value="Send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JQUERY:</p>
  
  <pre><code>var success = true;
  
  function validator(){
          var $this = $(this),
              inpVal = $this.val();
  
      if (inpVal!=''){
          console.log(inpVal);
      } else {
              console.log('Empty value');
                  success = false;
      }
      return success;
  }
  
  $('input[type="text"], textarea').on('blur', this, validator);
  
  
      $('.contact-form').submit('submit', function(){
  
      var elems = $(this).find('input[type="text"], textarea').blur(validator);
          elems.trigger('blur');
  
          if (success==true) {
                  console.log('Form submitted successfully');
          } else {
                  console.log("Form submission failure");
                  return false;            
          } 
  });
  </code></pre>
  
  <p>live code
  <a href="https://jsfiddle.net/logiccanvas/cLygrhrr/1/" rel="nofollow">https://jsfiddle.net/logiccanvas/cLygrhrr/1/</a></p>