Home  >  Article  >  Web Front-end  >  Version 2.0 of jquery does not support ie8

Version 2.0 of jquery does not support ie8

青灯夜游
青灯夜游Original
2022-09-13 18:42:281378browse

The 2.0 version of jquery does not support ie8. jquery is not compatible with IE8 starting from version 2.0.0, and will no longer handle compatibility with lower versions of IE (IE6, IE7, IE8). The official only does BUG maintenance, and no new functions will be added; if you need to be compatible with lower versions of IE browsers , it is recommended to use native JS or Jquery1.x version. Compared with 1.x, Jquery2.x does not add any new features. It mainly removes the support of ie678, improves the performance and reduces the physical examination.

Version 2.0 of jquery does not support ie8

The operating environment of this tutorial: windows7 system, jquery3.6.1 version, Dell G3 computer.

jQuery is a concise and fast JavaScript library that can be used to simplify event handling, HTML document traversal, Ajax interaction and animation for rapid website development. jQuery simplifies client-side scripting of HTML, thereby simplifying the development of Web 2.0 applications.

The purpose of jQuery design is "write Less, Do More", which means writing less code and doing more things. It encapsulates common JavaScript function codes, provides a simple JavaScript design pattern, and optimizes HTML document operations, event processing, animation design and Ajax interaction.

The core features of jQuery can be summarized as follows: It has a unique chain syntax and a short and clear multi-functional interface; it has an efficient and flexible CSS selector, and can extend the CSS selector; it has convenient plug-in extensions Mechanism and rich plug-ins.

The 2.0 version of jquery does not support ie8.

jquery is not compatible with ie8 starting from version 2.0.0, and will no longer handle compatibility with lower versions of IE (IE6, IE7, and IE8). If you need to be compatible with lower versions of IE browsers, it is recommended to use native JS or Jquery1.x version.

Version Description
1.x Compatible with ie678, the most widely used , the official only does bug maintenance, and no new functions will be added. Therefore, for general projects, you can use version 1.x. The final version: 1.12.4
2.x is not compatible with ie678 and is rarely used by people. The official only does bug maintenance and no new functions will be added. If browsers with lower compatibility versions are not considered, you can use 2.x. The final version: 2.2.4
3.x is not compatible with ie678 and only supports the latest browsing. device. Unless there are special requirements, version 3.x is generally not used. Many old jQuery plug-ins do not support this version. This version is currently the official main update and maintenance version.

The lower version of jq does not report an error under IE, while the higher version of jq reports an error under IE

Version 2.0 of jquery does not support ie8

View 2.0.0 The source code only has addEventListener. Obviously IE does not support this method. To add event listening under IE, you need to use attachEvent

Version 2.0 of jquery does not support ie8

. Let’s look at the source code of version 1.11.2. It’s a bit long. I did it. Judgment of addEventListener, if it is not supported, go to attachEvent

Version 2.0 of jquery does not support ie8

Of course, this is just the first error reported when using a higher version of jq. It will be clear when things get to this point. Check it out jq official website’s support for browsers http://jquery.com/browser-support/

We found this passage

Version 2.0 of jquery does not support ie8

If your English is not good, take Google translated it: (Current-1) and Current means that we support the current stable version of the browser and its previous versions. For example, if the current version of the browser is 24.x, we support both 24.x and 23.x versions.

Summary

The jQuery2.0.0 version does not have attachEvent, so an error will be reported under ie8 (of course, there is more than one reason for the error under ie8, but this is to fix the higher version of jq) The first problem that needs to be solved when reporting errors under ie8 is that this time involves a series of compatibility issues with ie8. These compatibility issues have been resolved with jq1.12-. There is a reason why the official recommendation is to use 1.12 under ie8)

The above is the detailed content of Version 2.0 of jquery does not support ie8. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn