Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery [attribute!=value] Selector

jQuery [attribute!=value] Selector

jQuery selector jQuery selector

Example

Select all elements whose class attribute valuedoes notequal "intro"

element:

$("p[class!='intro']")

Try it »


Definition and Usage

The [attribute!=value] selector selects every elementthat does not havethe specified attribute and value.

Elements that have the specified attribute but not the specified value are also selected.


Syntax

$("[

attribute!

=

'value'

]")

Parameters Description
attribute Required. Specifies the attribute to look for.
value Required. Specifies the value to find.

jQuery selector jQuery selector