add bg filter feature on the frontend

This commit is contained in:
Sanskar Tiwari
2023-04-20 16:37:58 +05:30
parent b2366993a8
commit ce6e367a95
2 changed files with 13 additions and 0 deletions

View File

@ -5071,4 +5071,16 @@ $(document).ready(function () {
closeMessageEditor();
}
});
$("#bg-filter").on("input", function() {
const filterValue = $(this).val().toLowerCase();
$("#bg_menu_content > div").each(function() {
const $bgContent = $(this);
if ($bgContent.attr("title").toLowerCase().includes(filterValue)) {
$bgContent.show();
} else {
$bgContent.hide();
}
});
});
})