jQuery 1.3

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

    You can 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 the selectors, which was called Sizzle . Among its features, speed is highlighted, which is claimed to be 49% better than in the previous version of the framework. In addition, a comparison is made with the work of selectors in other libraries:

    Selector operation
    Moreover, the technology itself was endowed with complete independence and autonomy, therefore it can be used in the future by 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 ("

    Another paragraph!

    "); });

    We look at a live example .

    Event object


    The technology for processing events that have entered the new jQuery.Event object , which functions normally in all browsers, has been seriously redesigned . Detailed information about the changes will appear a little later.

    HTML Injection


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

    Performance Injection Elements

    Offset Method


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

    Performance Offset

    User Browser Definition


    The new version uses a unique technology for determining the user's browser: instead of using the usual authentication through userAgent, jQuery models the specific features of each browser or tries to cause a typical error. All this is compiled into a special jQuery.Support object . However, 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 a new version of the framework on a page with code for the previous version:
    • The '@' character in the style selector has [@attr]been removed. Deprecated since version 1.2, this syntax no longer works. Just remove @in your code to work with the new version.
    • Events in triggers now go up the DOM. Your old handlers can now randomly capture more events than necessary.
    • The method .ready()no longer waits until all CSS is loaded. To work correctly, you need to make sure that all styles are connected before the scripts work.
    • .isFunction()it has become simpler, the range of supported functions has decreased (functions provided by browsers, such as alert(), as well as DOM methods, for example , are excluded getAttribute)
    • The order of style selectors of the form “a, b, c” may vary. Browsers that support querySelectorAll (Safari, Firefox 3.1+, Opera 10+, IE 8+) will return elements in the order in which they are located in the document, in the rest the order may be different. In version 1.3.x everything will be fixed.
    • Triggers and their handlers no longer accept event objects as an array, now they need to be defined directly as arguments.
    • The undocumented extra function is no longer used in triggers and their handlers.
    • jQuery.event.trigger no longer returns the last item returned by the handler. You must use the jQuery.Event object to get the desired return value ( event.result ).
    • You must make sure that the page is operating normally. There are cases when some methods did not work correctly when the compatibility mode is on (including errors in the operation of selectors in Safari).


    The full list of changes is available on the official website of the plugin .

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

    Do more, write less! ;)

    UPD: Added a list of critical changes.

    Also popular now: