I'm trying to find in my DOM all the img elements with 2x class using Vanilla JS. I'm using the querySelectorAll method like this:
document.querySelectorAll('img.2x');
But it throws this error at the console log:
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document':
'img.2x' is not a valid selector.
Why img.2x is not a valid selector? Thanks.