Closed salamj closed 5 years ago
There is an example on CodePen with multiple Siema instances. Please look for a solution first, open an issue then.
For anyone wondering how to solve this, what worked for me is creating a unique class for each Siema Instance.
Here is some pseudocode:
//js
const carouselId1 = nanoid() // or (Math.random() + 1).toString(36).substring(7);
const carouselId2 = nanoid() // or (Math.random() + 1).toString(36).substring(7);
new Siema({
selector: `.${carouselId1}`.
...
}
new Siema({
selector: `.${carouselId2}`.
...
}
// html
<div>
<div className={carouselId1}>
</div>
<div className={carouselId2}>
</div>
</div>
Hello
When make multi DIVs with the same class, only the first div works, And when (bad Idea) try to make for loop and use :
For each node , Also not work.
Thanks.