Score:0

How do I show a dropdown with items on hover in a cart?

uz flag

Currently, I am migrating a Drupal 7 site to Drupal 9. I want to show the added items when hovering the cart icon.

All I want to achieve is this dropdown on hover

Inspecting it, I noticed the c-layout-cart-menu-shown class is added to the c-cart-menu class; I have tried to achieve this with jQuery addClass(), but it's not taking the jQuery I wrote. I defined jQuery in info.yml and libraries.yml file.

Is there any other way to solve this problem?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.