Setting toastr opacity?

No JavaScript required for this. You should be able to change this in CSS using either

#toast-container > div {
    opacity:1;
}

or

.toast {
    opacity: 1 !important;
}

For those who want to decrease opacity, they can do something like this:

.toast-error { background-color: rgba(255,111,105,0.7) !important; }

I needed to do this for a single toastr so went this route:

toastr.options = {
    ... 
};

toastr.info(
    'All of my favorite singers have stolen all of my best lines',
    'The Title'
);

$('#toast-container').addClass('nopacity');

...and then...

#toast-container.nopacity > div {
    opacity: 1;
}

#toast-container > div {
   opacity: 1;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
  filter: alpha(opacity=100);
}

Test Working Example;

Tags:

Toastr