jQuery 1.1.3: Speed Improvements and Bug Fixes
After a long wait, jQuery 1.1.3 has been released! (Download it at the jQuery site) When I first adopted jQuery a year ago, the library boasted both faster speeds and smaller size than any other JavaScript Ajax/DOM tool. With the release of jQuery’s version 1.1.2, a number of jQuery’s operations became very slow and inefficiencient, as evidenced by MooTool’s SlickSpeed CSS Selector Test (found via Ajaxian) which crept up a few weeks ago.
This new release boasts an 800% speed improvement with a number of its selectors along with various enhancements across the board! The selector speed boost makes me one happy camper. Check out the enhancements as it compares to 1.1.2:
| Browser |
jQuery 1.1.2 |
jQuery 1.1.3 |
% Improvement |
| IE 6 |
4890ms |
661ms |
740% |
| Firefox 2 |
5629ms |
567ms |
993% |
| Safari 2 |
3575ms |
475ms |
753% |
| Opera 9.1 |
3196ms |
326ms |
980% |
| Average improvement: |
867% |
And here’s how it now stacks up against the SlickSpeed test:
| Browser |
Prototype |
jQuery |
Mootools |
Ext |
Dojo |
| IE 6 |
1476ms |
661ms |
1238ms |
672ms |
738ms |
| Firefox 2 |
219ms |
567ms |
220ms |
951ms |
440ms |
| Safari 2 |
1568ms |
475ms |
909ms |
417ms |
527ms |
| Opera 9.1 |
220ms |
326ms |
217ms |
296ms |
220ms |
In addition to the speed enhancements, there were several other notable things:
- Unicode Selectors: Yup…now you can use fancy non-english characters.
- Escape Selectors: This is awesome. Now, if you use weird characters (i.e. punctuation) in a class/id name, you can now escape those characters within the selector syntax. E.g. $(”div#foo\.bar”)
- Inequality Selector: You can now select elements where their attributes do not match a specific string of characters. E.g. $(”div[@id!=test]“)
- :nth-child() improvements: jQuery has supported selectors like :nth-child(1) and :nth-child(odd) since the beginning of jQuery, now they’ve added advanced :nth-child selectors, such as:
- $(”div:nth-child(2n)”)
- $(”div:nth-child(2n+1)”)
- $(”div:nth-child(n)”)
- Space-separated attributes: After being removed in jQuery 1.0, this selector has now been brought back by popular demand. It allows you to locate individual items in a space-separated attribute (such as a class or rel attribute). E.g. $(”a[@rel~=test]“)
- Animation Improvements: Animations are now significantly faster and smoother. Additionally, you can run more simultaneous animations without incurring any speed hits.
- DOM Event Listeners: Internally, the jQuery Event system has been overhauled to use the DOM Event system, rather than the classical “onclick” style of binding event handlers. This improvement allows you to be more unobtrusive in your use of the library (not affecting the flow of other libraries around it). Additionally, it helped to resolve some of the outstanding issues that existed with binding event listeners to IFrames.
- Event Normalization: Some great steps have been taken to normalize keyboard and mouse events. You can now access the event.which property to get most details about the specific key or button that was pressed.
- Multiple .is(): The .is() method can now take multiple selectors, separated by a comma. This allows you to test your jQuery set against multiple selectors. E.g. $(”div”).is(”:visible, :first”)
- Browser Version: A commonly requested feature, by plugin authors, was a way to determine what browser version their users were using. We now expose an extra property through which this information can be accessed. E.g. jQuery.browser.version
Additionally, the jQuery team has addressed 80+ bugs and has roadmapped out the next two releases (v1.1.4 and v1.2). To check out the full jQuery 1.2 roadmap, go here.
Discuss This Article
Leave a Reply
(1187) - jquery is visible (29) - jquery visible (22) - jQuery isVisible (19) - jquery visibility (18) - jquery escape (15) - jquery check if visible (11) - jquery firefox 3 (10) - jquery speed (10) - jquery check visibility (10) - jquery (9) - jquery check visible (6) - jquery check if element is visible (6) - jquery :visible (6) - jquery slow (6) - jquery iframe selector (6) - jquery if is visible (6) - jquery firefox3 (5) - jquery check element visible (5) - jquery if visible (5) - firefox 3 jquery (4) - jquery check for ie6 (4) - jquery test visibility (4) - jquery iframe event (3) - jquery find speed (3) - jquery is :visible (3) - jquery multiple selectors (3) - jquery escape quotes (3) - jquery keyboard listener (3) - jquery get visibility (3) - jQuery event listener (3) - jquery check ie6 (3) - jquery escape character (3) - jQuery set visible (3) - jquery escape char (3) - :visible jquery (3) - jquery haschild (2) - jquery iframe dom (2) - jQuery.browser.version (2) - jQuery bind escape (2) - visible jquery (2) - jquery find multiple tags (2) - Firefox 3 speed problems (2) - firefox3 speed (2) - jquery selector bug (2) - jquery visible() (2) - hasChild() JQuery (2) - jquery rel selector (2) - jquery iframes (2) - jquery check is visible (2) - jquery if( (2) - is visible jquery (2) - ajax in jquery in firefox (2) - firefox nth-child (2) - firefox3 jquery (2) - jquery checking if element is visible (2) - jquery bugs firefox 3 (2) - jquery mouse events (2) - jquery event listeners (2) - jquery test visible (2) - firefox 3 speed (2) - jquery unicode (2) - jquery is(":visible") (2) - mootool firefox 3 (2) - jquery selector escape char (2) - visibility jquery (2) - jquery this visible (2) - check div visible jquery (2) - mootool 1 (2) - jquery escape { (1) - scape javascript firefox3 (1) - javascript escape firefox3 (1) - jquery children firefox (1) - check visible jquery (1) - safari 2 jQuery bug (1) - jquery multiple attribute (1) - jquery get elements character (1) - jquery check if element has class name (1) - speed -x 1.1.3 (1) - jquery $this child (1) - escape string jquery (1) - jquery visibility: visible; (1) - jQuery.browser.version.string (1) - firefox 3 event listener (1) - jquery .is visible first (1) - jquery check ie version (1) - jQuery.browser.version < 7 (1) - jquery prototype mootool (1) - jquery .test visible (1) - jquery, what is escape (1) - jquery selector visible (1) - jquery check if IE (1) - Prototype $$() jquery slow page ie6 (1) - jquery iframe child selector (1) - jquery if div is visible (1) - jquery check if object is visible (1) - jquery escape quote (1) - jQuery check for IE6 ? (1) - jquery IE select bug (1) - $("#id").visible in jquery (1) - firefox 3 visibility (1) - firefox jquery animate (1) - jquery check for event (1) - prototype jquery speed (1) - jquery attribute rel (1) - nth-child firefox 3 (1) - jQuery is supported by firefox? (1) - weird characters jquery (1) - jquery selectos speed (1) - jquery rel attribut (1) - jquery ie animation bug (1) - jquery firefox child selector (1) - jquery child iframe (1) - speed test jquery prototype ext (1) - jquery if element visible (1) - jquery bug firefox 3 (1) - jquery multiple attribute selector (1) - jquery firefox 3 bugs (1) - event.which firefox version 3 (1) - check if element is animating jquery (1) - escape javascript bug firefox3 (1) - jquery ajax speed (1) - jquery find id beginning (1) - jquery get class details (1) - firefox speed improvements (1) - jQuery visible property (1) - syntax of div element in jquery (1) - jQuery escaping characters (1) - jquery if is class (1) - jquery find event listeners (1) - selectors jquery (1) - jquery check element has class (1) - check element visibility jquery (1) - mootool selector (1) - jquery check attribute (1) - jquery check attr (1) - jquery if ( is visible (1) - jquery iframe (1) - find elements begin with jquery (1) - jquery selectors iframe (1) - jquery nth-child bug (1) - jquery mootools resolve events (1) - jquery check for internet explorer (1) - attr('visibility','visible') jquery (1) - jquery, checking if something is visible (1) - jquery if element has class (1) - jquery :nth child css selector (1) - jquery test for ie6 (1) - jquery slow on ie (1) - get rel attribute jquery (1) -