⬆️ ⬇️

jQuery 1.3

Good news for all fans of this framework. On the birthday of the library (which is now three years old), the development team announced the release of a new version - 1.3!



Download the new version of the framework at the following links:



What's new?



Sizzle: New Selector Technology



First of all, I want to say about the new technology of selectors, which was called Sizzle . Among its features, they highlight the speed, which is claimed to be 49% better than in the previous version of the framework. In addition, there is a comparison with the work of selectors in other libraries:



Work selectors

At the same time, the technology itself was endowed with complete autonomy and autonomy, therefore it can be used further by the authors of other popular frameworks.

')

Live events: live events



The so-called “live events” appeared in the new version - events that can be defined for all current and subsequent elements:



  $ ("p"). live ("click", function () {
       $ (this) .after ("<p> Another paragraph! </ p>");
 }); 


See a live example .



Event object



The technology of processing events that were included in the new jQuery.Event object, which functions normally in all browsers, was seriously reworked. Detailed information about the changes will appear later.



HTML code injection



All code responsible for injecting code into HTML and working with DOM (such as .append() , .prepend() , .before() , etc.) has also been rewritten. As a result, again, the speed of these operations was increased compared with other libraries:



Speed ​​of injection of elements



Offset method



The .offset () method, which calculates the position of objects, is now also updated and faster:



Offset speed



User Browser Definition



The new version uses a unique technology to identify the user's browser: instead of using the usual identification through userAgent, jQuery models the specific features of each browser or tries to cause a typical error. All this is collected in a special jQuery.Support object. At the same time, the jQuery.browser object is still present in the library.



Critical changes



Developers are asked to pay attention to a number of changes that may cause errors when installing the new version of the framework on the page with the code for the previous version:





Full list of changes posted on the official website of the plugin .



In the next week or two, version 1.3.1 will be released with fixes for all found bugs.



Do more, write less! ;)



UPD: Added a list of critical changes.

Source: https://habr.com/ru/post/49115/



All Articles