Но это не так, где я потерпел неудачу?
Код: Выделить всё
apple
banana
cranberry
dates
eggfruit
0 Items Found
Please Refine Seach Criteria.
$(document).ready(function() {
$("#myInput").on("keyup", function() {
const value = $(this).val().toLowerCase();
$("#myTable tr").hide();
const shown =
$("#myTable tr").filter(function() {
return $(this).text().toLowerCase().includes(value)
});
shown.show();
$("#count").text(shown.length);
if ("#count").text(shown.length === 0)
$("#items").show();
});
});
Подробнее здесь: https://stackoverflow.com/questions/798 ... of-a-table
Мобильная версия