Open shahovkit opened 6 years ago
Duplicate of #438
I think that there is an easy way to manage different positionClass by specifying the containerId in the toastr options. Example:
toastr.options = {
"positionClass": "toast-top-right",
};
toastr.success("default toastr position");
toastr.info('custom toastr position', '',
{
positionClass: 'toast-bottom-full-width',
containerId: "toast-container-notifications"
}
)
The only change necessary to make this work is CSS. You need to find all css styling for #toast-container
and replace that with [id^='toast-container']
. You only need to make sure that you always name the containers with toast-container*
I need show toast for error with option "positionClass": "toast-top-right", and need show toast for warning with option "positionClass": "toast-bottom-right", but both toasts use only one setting.
CodePen