A workable strategy for a slightly complex info slider #2595
Unanswered
saleemepoch
asked this question in
1. Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
I am still pretty new to alpine.js and coming from jQuery world, so I am still trying to get my head around it. I would like some help/insight in how to use alpine.js to create an info slider that looks like this.
The idea is when the user clicks on item 1:
a) it animates the div inside li by adding w-full class and removing w-full from all other _li_s
b) it uses the index of the clicked li to target the right info-slide class and animates it to show while hiding others
c) it targets bottom images and changes them.
I have started with something like this:
As you can see, I have managed to get the index of the li clicked, but I am lost on how to target the div inside the clicked li and animate by adding w-full class.
I also want to target the right info-slide div to make it appear and hide others.
How can I achieve this?
Beta Was this translation helpful? Give feedback.
All reactions