Topic: MDB md-select md-outline
After I make a selection from the select list, how can I make my value text white. It defaults to a grey color.

Piotr Urbaniak
answered 4 months ago
Hello ayescas,
I have created a code snippet that should solve Your problem: Select color change
Hope this solution will help You. If You have any further questions, feel free to write.Best regards
ayescas
pro answered 4 months ago
ayescas
pro answered 4 months ago
THANK YOU SO MUCH ; On the same subject, I'm using the following JS to change the icon colors. How can I apply for this to work on the md-select list:
//LocalDistrict
const $iconLocalDistrict = $(".ico-LocalDistrict");
$("#g_LocalDistrict").focus(function() {
$iconLocalDistrict.removeClass("white-text").addClass("text-primary");
});
$("#g_LocalDistrict").blur(function() {
if(!$(this).val()) {
$iconLocalDistrict.addClass("white-text").removeClass("text-primary");
}
});
Piotr Urbaniak commented 4 months ago
Could You prepare a code snippet in our editor?
ayescas pro commented 4 months ago
Here you go, thank you. https://mdbootstrap.com/snippets/jquery/ayescas/2790798 When I add this to JS the code breaks: $(document).ready(function() { $('.mdb-select').materialSelect(); });
Piotr Urbaniak
answered 4 months ago
Hello ayescas,
You can try to use this code Icon color change
but generally the effect You want to achieve is difficult to achive with the current component structure.
Best regards
Answered
- User: Pro
- Premium support: No
- Technology: jQuery
- MDB Version: 4.19.1
- Device: MacBook Pro
- Browser: safari
- OS: OSX
- Provided sample code: No
- Provided link: No