MDB md-select md-outline


Topic: MDB md-select md-outline

ayescas pro premium priority asked 4 years ago

After I make a selection from the select list, how can I make my value text white. It defaults to a grey color.

enter image description here


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

Awesome thank you so much !!!!


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(); });


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


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • 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