The best way to explain the topic is by giving an example and a reference link:-
Example:-
The following jQuery selector syntax selects the first or nth element from the set of already selected (matched) HTML elements.
$("selector:contains(searchText)")
Html:-
<table>
<tr><td>John Smith</td><td>Marketing</td></tr>
<tr><td>Jane Smith</td><td>Sales</td></tr>
<tr><td>Mike Jordon</td><td>Technology</td></tr>
<tr><td>Mary Jones</td><td>Customer Support</td></tr>
</table>
Search: <input id="txtSearch" type="text">
<input id="btnTestIt" type="button" value="Test It">
<input id="btnReset" type="reset" value="Reset">
Jquery:-
$(document).ready( function(){
$("#btnTestIt").click( function(){
var searchText = $("#txtSearch").val();
$("td:contains('" + searchText + "')").css("background-color", "yellow");
});
$("#btnReset").click( function(){
$("td").css("background-color", "white");
});
});
<% foreach (var item in Model.Companies) { %>-
<% } %>
and script... – May 01 '09 at 22:25