You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fix is meant for people that use a cdn to import the file or a downloaded version of the file on their device/ server.
I have found out that this library creates a flood of errors when you are using the mdbootstrap library on your page.
To fix this missmatch you can get the script at the location you want to call the script:
var url = "The url you use to import the toastr.js file"
$.ajaxSetup({ cache: true });
$.getScript(url, function () {
toastr.options = {
"positionClass": "toast-bottom-right"
};
toastr.success('widget is toegevoegd');
});
$.ajaxSetup();
$.ajaxSetup Sets default values for future Ajax requests. $.getScript() Load a JavaScript file from the server using a GET HTTP request, then execute it.
Make sure to cache the script using $.ajaxSetup({ cache: true }) and removing this again using $.ajaxSetup() so it only applies to this function. Be aware that this overwrites any other $.ajaxSetup() settings you have set before. Also note that you should remove the Script tags for toastr in your html since you are retrieving the files in the code above.
If anyone has different ideas or maybe a cleaner fix/ solution to this issue I would gladly hear about them.
The text was updated successfully, but these errors were encountered:
This fix is meant for people that use a cdn to import the file or a downloaded version of the file on their device/ server.
I have found out that this library creates a flood of errors when you are using the mdbootstrap library on your page.
To fix this missmatch you can get the script at the location you want to call the script:
$.ajaxSetup Sets default values for future Ajax requests.
$.getScript() Load a JavaScript file from the server using a GET HTTP request, then execute it.
Make sure to cache the script using$.ajaxSetup({ cache: true }) and removing this again using $ .ajaxSetup() so it only applies to this function. Be aware that this overwrites any other $.ajaxSetup() settings you have set before.
Also note that you should remove the Script tags for toastr in your html since you are retrieving the files in the code above.
If anyone has different ideas or maybe a cleaner fix/ solution to this issue I would gladly hear about them.
The text was updated successfully, but these errors were encountered: