Given the following:
- Item 1
- Item 2
- Item 3
Refer to the jQuery API documentation: not() selector and not equal selector.
What about $("ul#list li:not(.active)")
?
http://api.jquery.com/not-selector/
You can use the .not() method or :not() selector
Code based on your example:
$("ul#list li").not(".active") // not method
$("ul#list li:not(.active)") // not selector
if (!$(row).hasClass("changed")) {
// do your stuff
}
You could use this to pick all li
elements without class:
$('ul#list li:not([class])')