Within a selector, how do I check if a value of an attribute contains ‘a’, ‘b’, or ‘c’ in a single line? Can you do for example: $('input[name]=a|b|c')? Well, I tested that and it didn’t work.
Within a selector, how do I check if a value of an attribute contains
Share
If nothing but a regex will do, you can try using
.filter():Another of the many ways to do this is to assemble a jQuery object with
.add(). And if you really mean contains rather than equals, don’t forget to usename*=a.