How to Update jQuery in Project
Posted By : Vivek Uniyal | 26-Aug-2019
Why do we need to update jquery: like every library jquery also provide frequent updates it can be by removing some buggy functions or adding new features to it which helps to run a fast and flawless script.
How to use Jquerymigrate: well it is simple but a step by step process which we need to keep in mind.
- To upgrade our code to jQuery 3.0, we first need to go to version 1.12.x or 2.2.x. If we are using an older version, first we need an upgrade to one of these versions using jQuery Migrate 1.x, to resolve any compatibility issues.
- If we are on version 1.12.x or 2.2.x. we can upgrade our jQuery by using jQuery Migrate 3.x, to resolve any compatibility issues.
After doing the above steps you might get some warning in your console when you open the page.
you can resolve all of these warnings by reading the jQuery Migrate document.
If there is no warning and only "JQMIGRATE: Migrate is installed with logging active, version x.x.x" this message is showing then it means you have successfully updated your jQuery.
note: you have to repeat this process to all of your pages in the project.
after this, you can remove the jQuery Migrate from your project.
thanks for reading my post happy jQuery upgrading.
you can read more on https://github.com/jquery/jquery-migrate.