Topic: Change Alert Icon on Toastr
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.
Add comment
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
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: No
- Technology: MDB jQuery
- MDB Version: 4.5.10
- Device: Desktop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Tags
Related topics