Topic: jQuery.Deferred exception: toastr is not defined when using Material Bootstrap Alert

user1234 free asked 7 years ago


Hello!I'm trying to invoke alert message each time when user fails to login. So I written this function which must be executed when document loads:

$(document).ready(function()

{

toastr.error('Wrong login credentials. Please, try again...');

});

But in js console i get this errors:

jQuery.Deferred exception: toastr is not defined @http://127.0.0.1:8000/login/:63:9j@http://127.0.0.1:8000/static/js/jquery-3.2.1.min.js:2:29997g/</k<@http://127.0.0.1:8000/static/js/jquery-3.2.1.min.js:2:30313undefined

ReferenceError: toastr is not defined

My scripts in html:

<script src="js/jquery-3.2.1.min.js"></script>

<script src="js/popper.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/mdb.min.js"></script>

<script type='text/javascript'>

$(document).ready(function(){

toastr.error('Wrong login credentials. Please, try again...');

});

</script>

All js files I've downloaded from Get Started page. Can you tell what is wrong with my code?


Jakub Strebeyko staff answered 7 years ago


Dear user1234, Good news is, there's nothing wrong with your code. Another good news is that toastr notifications functionality, just as over 2000 other components, 50+ premium sections, JS Modules, over 20 special plugins and page templates all are bundled together and shipped with the MDB PRO Package. For update and its details please refer to: https://mdbootstrap.com/product/material-design-for-bootstrap-pro/ Regads, Jake

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags