title: Error "if" "else" for validation of form
body: <p>I need to validate a form with <code>if</code> and <code>else</code> when you click the submit button.
  However something is not working, <code>if</code> everyone has to turn red if there is no value for the input. <code>else</code> removes the error class.</p>
  
  <p>I tried this way:
  JQuery:</p>
  
  <pre><code>var inp = $('.text-input');
  
      $("#send-lunch").click(function(err) {
          if(!$.trim(this.value) === true){
                $(".inputs-text").addClass('error');
  
              }else{
                $(".inputs-text").removeClass('error');
          }
      });
  
      inp.blur(err);
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ssts2/3/" rel="nofollow">jsfiddle</a></p>