Skip to content Skip to sidebar Skip to footer

Match Element To Part Of A Data Attribute Value?

I have a piece of code which targets an element that does not have a matching value in a data attribute. If I click a button, all elements that don't have a matching value in this

Solution 1:

So use attribute contains instead of equals.

$('div.professions:not([data-the-vals*="Female_Young.Dev"])');

Post a Comment for "Match Element To Part Of A Data Attribute Value?"