Choose img that does not contain a word in src

If I have 4 images

<img src="img/tracker/"/>
<img src="img/tracked/"/>
<img src="img/tracking/"/>
<img src="img/track/"/>

how can i select the last 3 images using src does not contain i tried $(img:not([src*="/tracker/"]))

+3
source share
1 answer
$('img:not([src*="/tracker/"])')...
  • The selector must be a string.

Live demo

+7
source

All Articles