cause:
there are many problems after a jQuery version upgrade in the project
Project errors are as follows:
1. Cannot read property ‘MSIE’ of undefined
2. Uncaught type error: $(…). Live is not a function
reason:
The latest version of jQuery discards many APIs, including two reported errors
method:
jQuery migrate, a plug-in developed by the jQuery team, automatically recovers APIs that have been abandoned since the latest version, so that the existing JS code can run normally with the latest jQuery library without any change
just refer to the migrate file after the referenced jQuery file
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
Similar Posts:
- The problem of: modulenotfoundererror: no module named ‘pyqt5’ appears in pychar using pyqt5
- JQuery Error: TypeError: jQuery.curCSS is not a function [How to Solve]
- Uncaught Error: Bootstrap’s JavaScript requires jQuery at bootstrap.min.js:6
- [Solved] jQuery Error: Uncaught ReferenceError: $ is not defined
- [Solved] zTree Error: cannot read property ‘init’ of undefined
- An error is reported when a dynamics CRM user is automatically added to the team after creation. The error message is: generic SQL error
- [How to Solve] Signing for “XXXX” requires a development team.
- [Solved] Runtime JAR file has version 1.4 which is older than required for API version 1.5
- Failed to load JavaHL Library. [How to Solve]
- Problem overview: the setcharacterencoding() method of httpservletresponse reports an error