I saw that jQuery has the jQuery-migrate script to safely upgrade jQuery. They have two jQuery-migrate repos:
Is it necessary to first migrate to 1.9 and then 3.x, or can I just include the first script in my website, and migrate to 3.x directly? Does the 3.x migration script not notify when APIs removed in 1.9 are used?
Updating jQuery may break your site You won't get any compile errors, but have to test the whole site. This means the risk of updating jQuery is pretty big. Even though it may seem like a big undertaking, jQuery Migrate helps you to find any changed interfaces and let your old code work with a newer jQuery version.
jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins.
This is one of the links you provided: https://github.com/jquery/jquery-migrate. You can find this paragraph in the link you provided in your question:
NOTE: To upgrade to jQuery 3.0, you first need version 1.12.x or 2.2.x. If you're using an older version, first upgrade to one of these versions using jQuery Migrate 1.x, to resolve any compatibility issues. For more information about the changes made in jQuery 3.0, see the upgrade guide and blog post.
Since you want to migrate from jQuery 1.4 to 3.0, and based on what the official documentation says, you first need version 1.12.x or 2.2.x if you plan to use jQuery Migrate 1.x for resolving compatibility issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With