Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to trigger multiple items with the same class? #1281

Open
golddragon007 opened this issue Feb 12, 2021 · 1 comment
Open

How to trigger multiple items with the same class? #1281

golddragon007 opened this issue Feb 12, 2021 · 1 comment

Comments

@golddragon007
Copy link

I have a specific class that appears multiple times on the page (i.e. dropdown containers) and I want to open all. As far as I noticed the querySelector is used because only the first occurrence is being triggered. Is there a way to trigger multiple ones? (ie instead of querySelector use querySelectorAll, or always use the second and if I need an item I can specify with :nth-child(X))

@masi
Copy link

masi commented May 17, 2021

https://github.com/garris/BackstopJS#selectorexpansion

I think this is what you are looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants