0

How to add multiple words in a jQuery contains selector?

The following doesn't work.

 let selector = `button:not(:contains('Following', 'Requested'))`;

Thank you

EnexoOnoma
  • 8,454
  • 18
  • 94
  • 179
  • 3
    Possible duplicate of [jQuery :contains selector to search for multiple strings](https://stackoverflow.com/questions/2416803/jquery-contains-selector-to-search-for-multiple-strings) – Xiyng Jun 16 '18 at 10:13

1 Answers1

0

You don't told us if you want both of words (logical AND) or any of words (logical OR). So I answer for both cases.

In jQuery selectors logical AND is: :contains(...):contains(...), and logical OR is: :contains(...), :contains(...).

Łukasz Jakubek
  • 995
  • 5
  • 12