AJAX
Basics
Data
DOM
Effects
Events
Forms
jQuery UI
Plug Ins
Traversing
The not()
method returns all elements that do not match the criteria.
This example will apply css to the lis which do NOT have a class of foo.
<ul id="example1">
<li class="foo">list item 1</li>
<li>list item 2</li>
<li> class="foo">list item 3</li>
<li>list item 4</li>
<li> class="foo">list item 5</li>
</ul>
$("#btnDemo").click(function ()
{
$("#example1 li").not(".foo").css({ "border-color": "red", "border-width": "3px", "border-style": "solid" });
});