jquerymodel-view-controllertoastr

Toastr notification not appearing when called


I tried the following code but nothing's popping up when I launch the page in my browser

$(function () { //ready
    toastr.info('For more information, see our FAQ guide located below.');
});

Solution

  • If you've included jQuery, toastr.js, and toastr.css in your page, then this should work. I'd make sure to check to see if your path to these scripts are all correct, and I'd check the console for any errors.

    <script src="/example-path-to/jquery-2.1.4.js"></script>
    <script src="/example-path-to/toastr.js"></script>
    <link href="/example-path-to/toastr.css" rel="stylesheet" />
    
    <script>
          $(function () { //ready
              toastr.info('If all three of these are referenced correctly, then this should toast should pop-up.');
          });
    </script>