My HTML is a list as bellow:
<ul class="friend_list">
<li>
<a href="#">Krishna</a>
<a href="#">Karan</a>
<a href="#">Ram</a>
<a href="#">Hari</a>
</li>
</ul>
<input type="text" name="sort" value="Search" id="sort">
Here when a user enters any string in the input text #sort
it should sort the value list according to match. Like if I enter K
in the input Krishna
and Karan
list should show and Hari
should hide. And again When I enter H
or Hari
, the Hari
li
should display and others should hide.
#sort
key up function should filter result as the SQL LIKE
Operator does.
Can anyone help me find a solution?