jqueryjquery-pluginsjquery-migrate

jQuery upgrade from 1.8.3 to 3.5.1


i know the following is written in the https://jquery.com/upgrade-guide/3.0/ site. but sadly it's confusing to me.

Use the following steps to upgrade from a version of jQuery older than 1.11.0 or 2.1.0 to this new version 3.0

its saying older than 1.11.0, which doesn't apply to my current version of 1.8.. so should i use the jquery-migrate-1.4.1.js or the jquery-migrate-3.3.1.js in my project? Thanks!


Solution

  • You should use both. First you update to v1.9+ using the jQuery plugin:

    https://github.com/jquery/jquery-migrate/tree/1.x-stable

    the plugin will show you all that needs to be updated on the console when you load your app. The details of what these messages mean are here:

    https://github.com/jquery/jquery-migrate/blob/1.x-stable/warnings.md

    When there are no warnings left, then you can repeat this process with the plugin for v3.0:

    https://github.com/jquery/jquery-migrate/#README

    And the meaning of the different warnings is here:

    https://github.com/jquery/jquery-migrate/blob/master/warnings.md