$(document).ready(function() { @@@when document ready
$('#searchme').keyup(function() { @@@for every key up/entered do this
searchme = $(this).val(); @@@text input field now equals this value
$('#names li').removeClass('highlight'); @@@grab the names and remove the highlights
if (jQuery.trim(searchme) != '') { @@@using jquery.trim on the field look for
$("#names li:contains('" + searchme + "')").addClass('highlight'); @@@key up grabs the names and adds the contains method and plus the input and highlights only the grabbed ones
}
});
also creating a style sheet that makes it look better and a index.php with a input and id and <ul>