The jQuery .not() method allows you to remove specified elements from the set of matched elements from another method.

For example, you want to select all of the <li> tags in an ordered list, except those of a specific class.

$("#topList li").not(".usa").css("background-color", "#aaccff");

The HTML for this script:

<ol id="topList">
    <li class="jap">Toyota</li>
    <li class="usa">Chevrolet</li>
    <li class="usa">Buick</li>
    <li class="jap">Nissan</li>
    <li class="ger">Audi</li>
    <li class="ger">Volkswagen</li>
    <li class="usa">Jeep</li>
    <li class="usa">Dodge</li>
</ol>

The result