jQuery "not readonly" selector

I'm looking for something along the lines of...

$(':input:not(readonly)') // all inputs which are not readonly

but struggling to find the syntax.

Any pointers? thanks


Solution 1:

This should work:

$(":input:not([readonly])")

Solution 2:

$('input:not([readonly])')

would cover readonly, readonly="true" and readonly="readonly"

Solution 3:

I recently did something similar like this:

$('#element').find(':input').not(':input[readonly]');

Solution 4:

I suppose you are looking for something like the following:

$('input:not([readonly="readonly"])')

Have a look at jQuery's various attribute-selectors.