Older version conflicting with newer version of jquery

后端 未结 2 614
暗喜
暗喜 2020-12-22 09:14

I am stuck in a major issue with jquery plugins. I have some code written with jquery 1.7.1, now I started using bootstrap and that need 1.9.1 jquery plugin or higher.

2条回答
  •  無奈伤痛
    2020-12-22 09:49

    You can try loading just the newer version of jQuery then loading jquery-migrate which will restore some old functionality. However, without knowing what specific features your app needs, I can't be sure that this will solve the problem.

    https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/1.2.1/jquery-migrate.min.js

    Ideally though, you should really identify the code that relies on older versions of jQuery and update them to work with the newest version. At the end of the day, the changes to jQuery were made for a reason. And you're almost certainly better off with the new implementations.

    If you smartly decide to update your code, the jQuery Core 1.9 Upgrade Guide would likely be a good place to start

提交回复
热议问题