Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. //Displays logging with the specific text that is typed in the search bar
  2. $("#LoggingSearch").keyup(function () {
  3. //$("#LoggingInputs option:first").attr('selected','selected');
  4. //$('#LoggingDatePicker').val('');
  5. var value = this.value.toLowerCase().trim();
  6. $("table tr").each(function (index) {
  7. if (!index) return;
  8. $(this).find("td").each(function () {
  9. var id = $(this).text().toLowerCase().trim();
  10. var not_found = (id.indexOf(value) == -1);
  11. $(this).closest('tr').toggle(!not_found);
  12. return not_found;
  13. });
  14. });
  15. });
  16.  
  17. //Displays logging with the specific date
  18. $('#LoggingDatePicker').change(function () {
  19. //$("#LoggingInputs option:first").attr('selected','selected');
  20. //$('#LoggingSearch').val('');
  21. var value = this.value.toLowerCase().trim();
  22. console.log(value);
  23. $("table tr").each(function (index) {
  24. if (!index) return;
  25. $(this).find("td").each(function () {
  26. var id = $(this).text().toLowerCase().trim();
  27. var not_found = (id.indexOf(value) == -1);
  28. $(this).closest('tr').toggle(!not_found);
  29. return not_found;
  30. });
  31. });
  32. });
  33.  
  34. //Displays logging with the specific logging level which is selected
  35. $("#LoggingInputs").change(function() {
  36. //$('#LoggingDatePicker').val('');
  37. //$('#LoggingSearch').val('');
  38. var value = this.value.toLowerCase().trim();
  39. $("table tr").each(function (index) {
  40. if (!index) return;
  41. $(this).find("td").each(function () {
  42. var id = $(this).text().toLowerCase().trim();
  43. var not_found = (id.indexOf(value) == -1);
  44. $(this).closest('tr').toggle(!not_found);
  45. return not_found;
  46. });
  47. });
  48. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement