Toastr notification not working

Oisín Foley picture Oisín Foley · Jan 15, 2015 · Viewed 20.1k times · Source

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

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



</script>

Answer

alex picture alex · Jun 12, 2015

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>