Reputation: 7233
I have that element:
<span class="class1 class2">...</span>
How can I select this elmement using both classes with Prototype JS? Like this maybe?
$$(span.class1.class2)
Thanks!
Upvotes: 2
Views: 953
Reputation: 142094
you also have native browser support:
document.querySelector('span.class1.class2')
which is faster then using any other wrapper.
Upvotes: 0
Reputation: 723598
Almost, you just forgot to put it in a string:
$$('span.class1.class2')
Upvotes: 2