I recently created a page search filter using Bootstrap 5, but it seems to only display text content and not any content enclosed within the a tags. You can check out the JS Fiddle link provided below for reference:
https://jsfiddle.net/mfen723/rozy16pt/17/
My goal is to modify the filter so that it displays the content within the a tags in addition to the text visible on the page, while still keeping the links clickable.
The current filter function I implemented is shown below:
$(document).ready(function() {
$("#searchInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#research *").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});