17

Selector starting with [name^="value"] selects elements that have the specified attribute with a value beginning exactly with a given string.

Is there a negative of this like so:

[name!^="value"]

which selects elements that have the specified attribute with a value NOT beginning with a given string.

1

2 Answers 2

28
$("div").not('[name^="value"]');
Sign up to request clarification or add additional context in comments.

Comments

19

Perhaps you can use the :not() selector: http://api.jquery.com/not-selector/

$('input').not('[name^="value"]')...;

Here's a jsfiddle using .not(): http://jsfiddle.net/hNhgf/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.