Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery.easing[jQuery.easing.def] is not a function #676

Open
rbdeenk opened this issue Nov 16, 2021 · 0 comments
Open

jQuery.easing[jQuery.easing.def] is not a function #676

rbdeenk opened this issue Nov 16, 2021 · 0 comments

Comments

@rbdeenk
Copy link

rbdeenk commented Nov 16, 2021

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.

@rbdeenk rbdeenk closed this as completed Nov 16, 2021
@rbdeenk rbdeenk reopened this Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant