0

低版本jQuery升级到高版本的jQuery

 2 years ago
source link: https://segmentfault.com/a/1190000040717148
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

低版本jQuery升级到高版本的jQuery

发布于 9 分钟前

低版本的jQuery升级到高版本的jQuery涉及到兼容性问题,需要使用兼容包jquery-migrate,
只需要将与高版本的JQuery同一大版本的jquery-migrate一同使用即可。
例:1.10.2版本升级到3.5.1版本

<!--<script type="text/javascript" src="/assets/ui/js/jquery-1.10.2.js" ></script> 将旧版本的注释-->
<!--添加新版本及migrate-->
<script src="/assets/scripts/js/jquery-3.5.1.min.js"></script>
<script src="/assets/scripts/js/jquery.migrate.3.3.0.js"></script>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK