title: jQuery compare inputvalue with span objects
body: <p>I've built a little game and everything works sofar, except the limitation of the user entering a number twice.</p>
  
  <p>User enter a number;</p>
  
  <pre><code>&lt;form&gt;
  &lt;input id="input" type="text" /&gt;
  &lt;input id="button" type="submit" value="Guess" /&gt;
  &lt;/form&gt; 
  
  var guess = $input.val();
  </code></pre>
  
  <p>The numbers(guesses) are sorted and stored in a span with id guesses.</p>
  
  <pre><code>    $guesses.append('&lt;span class="guess ' + responseClass + '"&gt;' + guess + " " +     '&lt;/span&gt; ');
      var sorted = $.makeArray($('#guesses span')).sort(function(a, b) {
          return (parseInt($(a).text()) &lt; parseInt($(b).text())) ? -1 : 1;
      });
  $('#guesses').html(sorted);
  </code></pre>
  
  <p>How can I compare inputvalue(guess) with the numbers stored in #guesses? Lets say I enter 50, and then 50 again - I want my program to tell me "already entered number" or something likewise.</p>