Cthulhu
Cthulhu

Reputation: 5235

Selector for select elements with names that don't start/end with "something"

In jQuery it's possible to select all elements that start/end with "something".

 = is exactly equal
!= is not equal
^= starts with
$= ends with

Is it possible to select all elements that don't start/end with "something"?

Upvotes: 7

Views: 1330

Answers (1)

bevacqua
bevacqua

Reputation: 48476

Use the :not selector:

:not([id^=foo])

Upvotes: 9

Related Questions