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 years 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 premium priority answered 4 years ago
ayescas pro premium priority answered 4 years 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 years ago
Could You prepare a code snippet in our editor?
ayescas pro premium priority commented 4 years 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 years 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: 4.19.1
- Device: MacBook Pro
- Browser: safari
- OS: OSX
- Provided sample code: No
- Provided link: No