$(document).ready(function(){
$.extend($.expr[':'], {
'containsi': function(elem, i, match, array){
return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0
}
})
})
function CT_filterTable(table_id, column_nr, text) {
table_id = "#"+table_id
$(table_id+" tr").hide();
$(table_id+" tr>td:nth-child("+column_nr+"):containsi('"+text.replace("'", "\\'")+"')").parent().show()
}
Highlight
Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts
2012-06-21
Filtering a table using jQuery:
Subscribe to:
Posts (Atom)