Zaphod Beeblebrox
Zaphod Beeblebrox

Reputation: 562

jquery selectbox css - trying to change the font color doesn't work as expected

I'm trying to change the text color in the dropdown boxes in a jquery selectbox plugin.

You would have thought changing the color in: .sbOptions a:link, .sbOptions a:visited {} and/or .sbOptions a:hover, .sbOptions a:focus, .sbOptions a.sbFocus {}

would have done the trick but surprisingly it doesn't and I can't figure out why. I don't know if it's perhaps something to do with the javascript

here's the fiddle

http://jsfiddle.net/FQKax/38/

Upvotes: 0

Views: 725

Answers (2)

Amit
Amit

Reputation: 22076

Try this

http://jsfiddle.net/FQKax/39/

You can use $(".sbSelector").css('color','Red'); to change color.

And you can also try $(".sbSelector").css('backgroundColor','#ee55ee');

http://jsfiddle.net/FQKax/44/

Upvotes: 0

Ankur
Ankur

Reputation: 12774

Works for me I tried

.sbOptions a:link, .sbOptions a:visited{
    color: #777;
    text-decoration: none;
}
.sbOptions a:hover,
.sbOptions a:focus,
.sbOptions a.sbFocus{
    color: #ddd;
}

Updated Fiddle

Upvotes: 1

Related Questions