Topic: jQuery.Deferred exception: toastr is not defined when using Material Bootstrap Alert
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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No