Tag intersections.
[wolnelektury.git] / src / catalogue / static / 2022 / book / filter.js
index 15d4e34..ac26749 100644 (file)
@@ -2,6 +2,13 @@
 
     $(".quick-filter").each(function() {
         let bookList = $('#' + $(this).data('for'));
+        let filterList = $('.' + $(this).data('filters'));
+        $(this).on('focus', function() {
+            filterList.addClass('filters-enabled');
+        });
+        $(this).on('blur', function() {
+            filterList.removeClass('filters-enabled');
+        });
         $(this).on('input propertychange', function() {
             let search = $(this).val().toLowerCase();
             bookList.children().each(function() {