Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Change Alert Icon on Toastr

Zhao pro asked 6 years ago


How can I change Alerts Icons (toastr). For instance, I want to change toastr["info"]("Info alert") icon, default it appears fa-info icon and I want to change it to fa-cloud.

Jakub Strebeyko staff answered 6 years ago


Hi there Zhao, Font Awesome icons in Alerts are a matter of styling (as opposed of having an actual icon element inside hard-coded). It means that while it might get somewhat tricky to change default toast icons programmatically with JavaScript, it is really easy to just overwrite them using CSS. Cloud icon's code is "f0c2". Best, Kuba

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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No