Tag intersections.
[wolnelektury.git] / src / catalogue / static / 2022 / book / filter.js
index e4538ce..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() {
             }, 200);
         }, 200);
     });
-    $("#sort-popular").on('click', function() {
-        $(".l-books__item").each(function() {
-            $(this).css('order', $(this).attr('data-pop'));
-        });
-    });
-    $("#sort-popular").on('click', function() {
-        $(".l-books__item").each(function() {
-            $(this).css('order', $(this).attr('data-pop'));
-        });
-    });
-    
     
 })(jQuery);