Jquery: Get text of element inside $(this)
<p>here's a snippet of jquery code that works for me:</p>

<pre><code>   onSelect: function() {
        var thevalue = $(this).val();
        jQuery('#input').val(thevalue);
    }
</code></pre>

<p>The markup is like this: There's a text , 
and then a list of auto-suggested items</p>

<pre><code>&lt;ul class="ac_results"&gt;
&lt;li&gt;&lt;span class="suggested"&gt;
  &lt;span class="ac_matched"&gt;(matched text)&lt;/span&gt;
 (rest of auto-suggested text)&lt;/span&gt;
&lt;div class="count"&gt;(number)&lt;/div&gt;
 &lt;/li&gt;
repeat..
repeat...
etc...
&lt;/ul&gt;
</code></pre>

<p>This markup/jQUery combo WORKS, but returns the full string with the number into the input field. I want to leave out that number, so I did:</p>

<pre><code>   onSelect: function() {
        var thevalue = $(this).find(".suggested").text();
        jQuery('#input').val(thevalue);
    }
</code></pre>

<p>It returns empty. </p>

<p>the number could be anything, and the span COULD contain numbers, so I'm weary of just filtering out numbers.</p>
