title: clearing items from a list based on user input
body: <p>Looking for a jquery method to narrow down an unordered list by user input. Each item on the list contains a first and last name. Purpose is to use both to narrow down the list, so if first letter is "x" all items without "x" in first name OR last name will be cleared. Additionally if list is narrowed down to 0 id like to fire a function (ajax call, but could be anything).</p>
  
  <p><strong>html:</strong>   </p>
  
  <pre><code>&lt;input id="listCheck"&gt;
      &lt;ul&gt;
      &lt;li class="entry"&gt;&lt;span class="nametext"&gt;alex crain&lt;/span&gt;&lt;/li&gt;
      &lt;li class="entry"&gt;&lt;span class="nametext"&gt;Bart Simpson&lt;/span&gt;&lt;/li&gt;
      &lt;li class="entry"&gt;&lt;span class="nametext"&gt;Jessica Alba&lt;/span&gt;&lt;/li&gt;
      &lt;li class="entry"&gt;&lt;span class="nametext"&gt;Will Farrell&lt;/span&gt;&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p><strong>js:</strong></p>
  
  <pre><code>$("listCheck").keyup(function(){
      var term = $(this).val();    
  });
  </code></pre>
  
  <p>I am assuming I need to transform the spans into an array with first and last names separated and then loop through them all. <a href="http://jsfiddle.net/paulmovie/y296xnpk/1/" rel="nofollow" >Fiddle</a></p>