HTML:
<a class="someclass-random1 selected">The third div element.</a>
<p class="selected someclass-random2">This is some text in a paragraph.</p>
Selector: $('*[class^=someclass]')
This selector works on <a>
, but not on <p>
.
Why would that be?
Edit: corrected typo