I have this search script on my page which search through the displayed table. The table is displayed with PHP from a database. It is actually a list, and this list is sorted out alphabetically with the help of hyperlinks of A to Z. Now I need to search the whole database instead of displayed ones. Any helps or resources would be helpful. :)
$(document).ready(function() {
$("#search").keyup(function() {
if($(this).val() != "") {
$("#some_table tbody>tr").hide();
$("#some_table td:contains-ci('" + $(this).val() + "')").parent("tr").show();
} else {
$("#some_table tbody>tr").show();
}
});
});
$.extend($.expr[":"], {
"contains-ci" : function(elem, i, match, array) {
return (elem.textContent || elem.innerText || $(elem).text() || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
}
});