title: Cannot call method 'toLowerCase' of undefined
body: <p>I'm trying to refactor my js code to be more dry-conventioned, but stuck this error. Here is my code</p>
  
  <pre><code>function validate_field(e){
      console.log(typeof e);
      $(e).focusout(function(e){
          var price = $(e).val();
          var number = parseInt(price, 10);
          console.log(number)
          if (number &lt; 0)
          {
              $(e).val(0);
          }
      })
  }
  $(function(){
      validate_field('#price');
  })
  </code></pre>
  
  <p>According to stacktrace error is somewhere here <code>var price = $(e).val();</code>
  What am i missing here?</p>