What's the best way to select elements where any attribute contains a specific string?
I know the following works if I know the attribute name:
// Select any element where data-test attribute contains rbl-value
var items = $("*[data-test*='rbl-value']");
But I could have rbl-value
inside any attribute and I want to be able to process those elements/attributes.
<div class="rbl-value:itemClass">
<p>Don't process me...</p>
<p data-inputname="rbl-value:inputName">data-inputname should be processed.</p>
</div>
Assuming there is clever solution, how performant is it?