Quick question:
let's say you have 2 different types of <button>
,
First one looks something like this: <button class="test">
Second looks like this: <button class="test" disabled="disabled">
.
Now, how can one achieve a selection of the disabled button without selecting the activated
button? Cause if you go by class, querySelector
would get both of them. Is there a way to implement some kind of logic into the selection made by querySelector
?
Something like this maybe -> "select button with class 'test' AND NOT attribute 'disabled'"
?
Thanks in advance.