Как осуществить поиск в базе данных?
Проблема в том что он осуществляет поиск на 1 странице, а надо чтобы по всем. По сути поиск по тегам, должен быть такой же как на этом сайте
search.js
$(document).ready(function () {
$("#anythingSearch").on("keyup", function () {
const value = $(this).val().toLowerCase();
$("#tagsTable *").filter(function () {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
вывод тегов
writeTags() {
$('#tagsTable').children().remove()
this.tags.then(function (response) {
for (var i = 0; i < response.items.length; i++) {
$('#tagsTable').append(
" <div class=\"child\">"
+ "<p class=\"media\">"
+ "<a href=\"#\" class=\"mb-1\">" + response.items[i].name + "</a>"
+ "<div><small>" + response.items[i].description + "</small></div>"
+ "<p>"
+ "<div class=\"child2\"><small class=\"text-muted\">" + response.items[i].countQuestion + " вопросов" + "</small></div>"
+ "<div class=\"child2\">"
+ "<small><a href=\"#\" class=\"text-muted\">" + response.items[i].countQuestionToDay + " задано сегодня, " + "</a></small>"
+ "<small><a href=\"#\" class=\"text-muted\">" + response.items[i].countQuestionToWeek + " за неделю" + "</a></small>"
+ "</div> </p> </div>");
}
})
this.tagsPageNavigation()
}