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>