Targetting multiple elements with class instead of ID? #2544
Unanswered
lukejames1111
asked this question in
Q&A
Replies: 1 comment
-
This isn't currently supported but might be an interesting idea. For now you could do a forEach over the node list. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have multiple dynamic elements on a page that I want to trigger by a single function. Currently I have to target the ID of each element like:
new tempusDominus.TempusDominus(document.getElementById('icon-only'));
But how can I change that so I can have multiple elements on the page that I can target by the class instead? For example:
new tempusDominus.TempusDominus(document.getElementsByClassName('icon-only'));
Beta Was this translation helpful? Give feedback.
All reactions