Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <script type="text/javascript">
  2. $("#search").keyup(function () {
  3. var value = this.value.toLowerCase().trim();
  4.  
  5. $("table tr").each(function (index) {
  6. if (!index) return;
  7. $(this).find("td").each(function () {
  8. var id = $(this).text().toLowerCase().trim();
  9. var not_found = (id.indexOf(value) == -1);
  10. $(this).closest('tr').toggle(!not_found);
  11. return not_found;
  12. });
  13. });
  14. });
  15. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement