DarkArmada
New Member
I have inherited some code that sets the css of a select box depending on the option that has been selected. There are many select boxes on the page and my goal is just to get select boxes that have the "failure" css style.I think that I have got relatively close but I just can't get it to work for me. Relatively close means that I can get the css class displayed in a JavaScript alert box but when I try to use that text value in an if statement nothing happens.That code is below.Any pointers gratefully received.\[code\]$("select").each(function () { alert(this.options.item(this.options.selectedIndex).className); if (this.options.item(this.options.selectedIndex).className == 'frm_ddl_notOk') { alert('bunter?'); }});\[/code\]