How to get multiple Atropos on the same page? #8
Answered
by
nolimits4web
BrandonCronk
asked this question in
Q&A
-
How do I get multiple cards on the same page to work with the same class? I noticed that your homepage example has a class called movie-box and game-box for multiple examples on the same page. When I initialize Atropos, I only get the effect on the first instance of that class. |
Beta Was this translation helpful? Give feedback.
Answered by
nolimits4web
Oct 12, 2021
Replies: 1 comment
-
You need to initialize Atropos for every element, e.g.: document.querySelectorAll('.my-atropos').forEach((element) => {
Atropos({
// pass unique element here
el: element,
// rest of parameters
});
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BrandonCronk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to initialize Atropos for every element, e.g.: