jQuery .not() .not () selects the selected elements except for a specific selector. grammar .not( selector ) for example $( 'p' ).not( 'p.abc' ).css( 'color', 'green'); Select one that does not have abc in the p element as a class value. example Clicking the button replaces the contents of the li element, which does not have ip as a class value, in red. Click Lorem Ipsum Dolor