Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom color for each individual option #49

Closed
stig22 opened this issue Mar 31, 2015 · 1 comment
Closed

Custom color for each individual option #49

stig22 opened this issue Mar 31, 2015 · 1 comment

Comments

@stig22
Copy link

stig22 commented Mar 31, 2015

Is it possible to set a different text color for each option within a sumoselect control?

I tried the following but did not seem to take effect: (text color still black)

-  $("#sumoselectControl option")[aryOptionListIndex].style.color = "#FF00CC"

-  $.each(aryOptionList, function (key, value) {
            $('#sumoselectControl')
                .append($("<option style='color:#FF00CC;'></option>")
                .attr("value", value)
                .text(value))
        });

Any ideas?

Thanks!!
Steve

@HemantNegi
Copy link
Owner

Yup
Now the classes added to options are added to corresponding li in the control.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants