jQuery:Selector :not(selector)

Overview

Removes all elements that match the given selector.

In jQuery 1.3, complex selectors have been supported (eg not (div a) and: not (div, a)).

Parameter

selector Selector V1.0

A selector for filtering.

Demo

Description:

Finds all input elements that are not selected.

HTML code:
<input name="apple" />
<input name="flower" checked="checked" />
jQuery code:
$("input:not(:checked)")
Result:
[ <input name="apple" /> ]

Leave a Reply

Your email address will not be published. Required fields are marked *