Select elements that don't have certain classes

I have a jQuery script that changes the background color of odd rows in a table. If a row has class “new”, though, it won’t change it:


$(document).ready(function() {
	$('tr[class!=new]:odd').css({'background-color':'#ddd'});
});

Is it possible to specify another class (together with “new”) to which the script should not change the color? If yes, what’s the syntax?

Hi,

Assuming it works according to spec here’s how you specify multiple attributes in a selector.
Selectors


span[hello="Cleveland"][goodbye="Columbus"] { color: blue; }

It works :slight_smile:

Thank you very much!