hands up!
I have a card slider that shows categorized products, in the buttons according to which you click you must filter and in the slide the cards will be shown according to the selected categories:
I want to filter by category, while doing research it said that a class with a name equal to the category to which the item belongs was added separately to each item, but when I tried to do so, the class when added is placed on all the items. Is there a way to relate the class to the category? Or better yet, is there a better way to do the filtering?