diff --git a/jquery search filter b/jquery search filter new file mode 100644 index 00000000..d95c96ae --- /dev/null +++ b/jquery search filter @@ -0,0 +1,20 @@ +$("#search").on("keyup", function () { + var input, filter, table, tr, td, i; + input = $("#search"); + filter = input.val().toUpperCase(); + table = $("#table"); + tr = table.find("tr"); + + tr.each(function () { + var linha = $(this); + $(this).find('td').each(function () { + td = $(this); + if (td.html().toUpperCase().indexOf(filter) > -1) { + linha.show(); + return false; + } else { + linha.hide(); + } + }) + }) +})