title: jquery .prev() yields undefined
body: <p>This question is asked before but the answer given does not help me figure out why the following code does not work:</p>
  
  <pre><code>$.fn.humanCheck = function(){
        var user_answer = this.val();
        var real_answer = this.prev("#captcha-real").val();
        alert(user_answer + " or " + real_answer);
        if(real_answer != user_answer || user_answer === ""){
          this.val("");
          $('span#required').text('To prove that you are human, please provide a valid answer above');
        }
        return this;
      };
  </code></pre>
  
  <p>The variable real_answer yields "undefined" why? </p>
  
  <p>Here is the full code: <a href="http://jsfiddle.net/rj32ay37/11/" rel="nofollow">http://jsfiddle.net/rj32ay37/11/</a></p>
  
  <p>The issue here is that I have 7 forms on the same page they all use the same captcha form group. So there are multiple <code>input#captcha-user</code> and <code>input#captcha-real</code> on the page. The question and answer is generated randomly with php <code>mt_rand()</code>. So when user fills the user_answer field, the answer should match the real_answer field above it</p>
  
  <p>Thanks for you help</p>