title: JQuery - object.id is undefined when it shouldn't be
body: <p>I'm working with JQuery and i'm running into this strange (or perhaps stupid) error.</p>
  
  <p>In my HTML I have:</p>
  
  <pre><code>&lt;input type="password" name="repeatPassword" id="id_repeatPassword" /&gt; 
  </code></pre>
  
  <p>And then in my javascript code i have:</p>
  
  <pre><code>validateRepeatPassword($('#id_repeatPassword'));
  </code></pre>
  
  <p>Unfortunately in the function "validateRepeatPassword":</p>
  
  <pre><code>function validateRepeatPassword(o) {
          // this works
          if (o.value == $("#id_password").val()) {
          // this returns "undefined"
          alert(o.id)
  ...
  }
  </code></pre>
  
  <p>why?</p>