<a class="btn btn-primary" data-toast-type="warning" data-toast-text="Hi! I'm warning message.">
    warning message

Alerts - Do not implement!

Modals are used instead of alerts.

Based on the version from MDB:


To start using this component, some JavaScript is needed to initialize it. Underneath a jQuery example which reads the toast-type and toast-text data attributes on the element to be used for the toastr/alert and should be placed in the Additional component(s) script section as documented in How to use.

    $('[data-toast-type]').click(function() {
        var toastrType = $(this).data('toast-type');
        var toastrText = $(this).data('toast-text');
        toastr[toastrType](toastrText, '', {
            closeButton: true,
            timeOut: 0,
            extendedTimeOut: 0