live search jquery (searching in li title)
<p>I try to search with an input field a list of items,</p>

<pre><code>&lt;ul class="display"&gt;
 &lt;li title="Pizza Otto"&gt;some divs&lt;/li&gt;
 &lt;li title="Pizza Prono"&gt;some divs&lt;/li&gt;
 &lt;li title="Pizza David"&gt;some divs&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>The code below works fine for words in the <code>&lt;li&gt;...&lt;/li&gt;</code> I want to put there some divs and to add a title attribute to <code>&lt;li&gt;</code> where to make the search. </p>

<pre><code>$('input[name="q"]').search('.display li', function(on) {
    on.all(function(results) {
        var size = results ? results.size() : 0
        $('#count').text(size + ' results');
});
</code></pre>

<p>Any idea for the right selector here: <code>.search('.display li'</code>?  Or where I have to make the changes? </p>

<p>Thanks and sorry for my English...</p>

<p>P.S. Is my first question here!</p>

<p>UPDATE: function to test if the val is contained</p>

<pre><code> function query(selector) {
    if (val = this.val()) {
      return $(selector + ':contains("' + val + '")');;
    } else {
      return false;
    }
  }
</code></pre>
