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, such as Jquery1.12.
[Related recommendations: jQuery video tutorial]
jQuery is a simple and fast JavaScript library that can be used Simplify event handling, HTML document traversal, Ajax interactions and animations 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.
From which version does jquery become incompatible with 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.
The lower version of jq does not report an error under IE, while the higher version of jq reports an error under IE
View the source code of 2.0.0, There is only addEventListener. Obviously IE does not support this method. To add event listening under IE, you need to use attachEvent
. Let’s look at the source code of version 1.11.2. It’s a bit long. I’ve done some modifications to addEventListener. Judgment, if it is not supported, go to attachEvent
Of course this is just the first error reported when using a higher version of jq. Things will be clear at this point. Check the jq official website for details. Browser support http://jquery.com/browser-support/
We found this paragraph
My English is not good, so I used Google Translate Below: (Current-1) and Current indicate 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.
The last sentence, if you want to support ie6-8, use jq1.12-.
To sum it up in one sentence: jQuery2.0.0 version does not have attachEvent, so an error will be reported under ie8 (of course under ie8 There is more than one reason for the error, but this is the first problem that must be solved if you want to fix the error reported by higher versions of jq under ie8. This time involves a series of ie8 compatibility issues. These compatibility issues jq1.12- have been solved. The official recommendation is ie8 There is still a reason to use 1.12)
For more programming-related knowledge, please visit: Programming Video! !
The above is the detailed content of From which version does jquery become incompatible with ie8?. For more information, please follow other related articles on the PHP Chinese website!