jQuery: select all elements of a given class, except for a particular Id

asked15 years ago
last updated9 years ago
viewed140.4k times
Up Vote169Down Vote

This is probably pretty simple.

I want to select all elements of a given class thisClass, except where the id is thisId.

i.e. something equivalent to (where -/minus implies remove):

$(".thisClass"-"#thisId").doAction();