8 – Hide items when loading, then show and reset when you click the filter to hide them with the general data filter

Maybe the title is not very clear, I will try to explain it better.
I have an isotope view where taxonomies (as a link) are filters and nodes are elements. In addition, I have to display the taxonomy descriptions (shown as full entities) when clicking on the appropriate taxonomy filter. The taxonomy description appears when I click the Taxonomy Filter link, and related nodes are filtered.
If I click on the general (*) data filter text, I have to hide the taxonomy description again.

I was able to find a way in an HTML demo and am trying to reproduce it in drupal8, but that doesn't seem to work, so I need help.

What I did:
I have assigned the general (*) data filter a class with the name "delete filter" and other filters a class "Filter Show" for Javascript selectors.
I have assigned two classes to the elements that I need to hide (the taxonomy descriptions) called "Categories" and "Elements to Hide". I also created a "Items to Show" class that replaces the "Items to Hide" when a filter is clicked and the JavaScript code is executed.

Here is the HTML code of the filters:

Then the code for the default hidden items (or page loading):

    
  • Casa

    Esistono innumerevoli variazioni dei passaggi del Lorem Ipsum, ma la maggior parte hanno subito delle variazioni del tempo, a causa dell’inserimento di passaggi ironici, o di sequenze casuali di caratteri palesemente poco verosimili.

  • Residenze speciali

    Il brano standard del Lorem Ipsum usato sin dal sedicesimo secolo è riprodotto qui di seguito per coloro che fossero interessati. Anche le sezioni 1.10.32 e 1.10.33 del "de Finibus Bonorum et Malorum" di Cicerone sono riprodotte nella loro forma originale, accompagnate dalla traduzione inglese del 1914 di H. Rackham.

And here is my simple custom JS code:

jQuery(document).ready(function($){
  $(".filters-show a").click(function(){
    $(".categories").removeClass("items-to-hide").addClass("items-to-show");
  });

});
jQuery(document).ready(function($) {
    $(".clear-filters").click(function () {
        $(".categories").addClass("items-to-hide");
    });
});

The first part of the code works. If you click on a filter of my view, the link given above shows the taxonomy description and the associated nodes. But when I click on the "Tutte" link (filter with data attribute = *), the class is not added.
Note that I wrote the CSS lines so that the "elements to be hidden" overwrite the "elements to be displayed".
In an earlier version of the script, I also removed the items-to-show class, which seems to work in HTML but not in Live Drupal, which means:

$(".categories").removeClass("items-to-show").addClass("items-to-hide");

I tried to split the code into two JS library declarations, but to no avail: the second JS doesn't load at all, can't understand why.

Any help is appreciated.
Thank you so much!

An attempt is made to hide buttons if you are not logged in

I am trying to hide two buttons when the administrator is not logged in. I add the "logged in" class to hide my buttons when the administrator is not logged in. My method of hiding has worked so far. I am sending my "Logged in Logged out" method and the code snippet in which my buttons are located. Buttons are located near the bottom area. Hiding method when logging in or logging out

Plotting – Insets hide behind a surface

In the code below, the "Hi" is above the surface, but you still can't see it from above.

g = Graphics3D[{}, ViewPoint -> 10^3 {1, 1, 1}];
g = Show[g,
   Plot3D[0, {x, -1, 1}, {y, -1, 1}, RegionFunction -> vis, 
    PlotStyle -> Directive[LightGray, Opacity[1], Specularity[100]], 
    Mesh -> None],
   Graphics3D[Inset[Text[Style["Hi", FontSize -> 200]], {0, 0, 1}]]
   ];

Enter the image description here