jQuery 1.1.3: 800%+ Faster, still 20KB

Posted on by

I’m pleased to announce the release of jQuery 1.1.3. After many months of testing, developing, and more testing, we have a very solid release available for download. It comes with roughly 80+ fixed bugs and a handful of enhancements for good measure. Highlights include:

  1. Improved speeds, with DOM traversal over 800% faster than in 1.1.2.
  2. A re-written event system, with more graceful handling of keyboard events.
  3. A re-written effects system (with an accompanying fx test suite), featuring faster execution and better cross-platform support.

Update – July 4th: We just finished a quick bug fix release, versioned 1.1.3.1, which fixes a couple of outstanding issues.

Download:

As always, if you find any bugs with this release, please post them to the jQuery Bug Tracker.

1.1.3 Features

Massive Selector Speed Improvements

Due to popular demand, we dug deep and made some major changes to jQuery’s selector engine. Here’s a breakdown of the speed improvements that were made to jQuery itself. All numbers are based on the SlickSpeed test suite.

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%

Additionally, we tested the improved code base against some of the other popular selector libraries, again with the SlickSpeed test suite.

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

A couple things to notice when looking at the speed suite results are that:

  • We’re over 800% faster than we were in jQuery 1.1.2.
  • We’re the fastest framework in the most popular browser, Internet Explorer 6.
  • We’re the only framework that doesn’t give incorrect results.
  • And all of this comes at no expense to you — jQuery is still the same 20KB that you’ve come to expect and enjoy.

New Selectors

Unicode Selectors: This is a huge addition for those of you who want to use Unicode attribute values, IDs, class names, or tag names. You can now use them directly in jQuery selectors:

$("div.台北")
$("div#台北")
$("foo_bar台北")
$("div[@id=台北]")

Escape Selectors: A frequently requested feature you can now select elements by ID (or other selector) that uses a special character, for example this will find the div that has the ID of “foo.bar”:

$("div#foo\\\\.bar")

Inequality Selector: While this selector isn’t part of the CSS specification, it’s frequently used and included in other selector libraries, so we decided to add it in:

$("div[@id!=test]")

:nth-child() improvements: This selector allows you to locate specific child elements. We’ve supported selectors like :nth-child(1) and :nth-child(odd) since the beginning of jQuery, now we’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).

$("a[@rel~=test]")

Animation Improvements

Speed: Animations are now significantly faster and smoother. Additionally, you can run more simultaneous animations without incurring any speed hits.

Testing: We now have a dedicated test suite for animations — which has allowed us to fix a number of pressing animation bugs that weren’t previously locatable.

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.

$("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.

jQuery.browser.version

More Bug Fixes

Please see the ticket listing for the full list of all issues resolved in this release.

The Future of jQuery

We’ve been very concerned with the direction and progress being made towards furthering the jQuery project. We’re focusing on a number of different aspects now, but the primary concern is still the advancement of the core jQuery library. We’ve spec’d out the next two releases, which you can read more about below:

jQuery 1.1.4

This will be the last release of the jQuery 1.1 branch – another bug fix release with some minor improvements. This release will also mark a number of methods as deprecated, in accordance with the upcoming jQuery 1.2 release.

We’re currently planning on having this release take place at the end of July.

jQuery 1.2

This will be the next major release of jQuery, containing a significant number of new features. The full details of this release can be found in the jQuery 1.2 Roadmap.

Your comments and feedback on this release are greatly appreciated. It’s still in planning, so nothing is completely final. We’re currently planning on releasing jQuery 1.2 by the end of August.

jQuery Books

We’re now up to 4 jQuery books being written and, just as importantly, they’re all being written by members of the jQuery team (so you’ll know that you’re getting good information).

The books and their authors are as follows:

  • Learning jQuery by Karl Swedberg and Jonathan Chaffer – due out early July 2007 (Packt Publishing).
  • jQuery Reference Guide by Karl Swedberg and Jonathan Chaffer – due out Summer 2007 (Packt Publishing).
  • jQuery Quickly by Yehuda Katz and Bear Bibeault (Manning Publishing).
  • Designing with jQuery by Glen Lipka (Manning Publishing).

This is really fantastic news. I’ve been able to read some of the pre-release chapters and I think you’re going to be in for a real treat with these books.

jQuery Talks and Conference

I’d like to announce some talks being given about jQuery in the upcoming months. Specifically, there will be a number of talks given about jQuery at both of the Ajax Experience conferences.

At the San Francisco Ajax Experience, John Resig will be giving an introductory overview to jQuery followed by an advanced jQuery talk. Glen Lipka will be giving a talk on designing with jQuery.

At the Boston Ajax Experience, John and Glen will be presenting again, and will be joined by Paul Bakaus to give a talk on developing intense applications and games with jQuery.

Since there’s going to be quite a few members of the jQuery team at the Boston Ajax Experience, we’d like to announce that we’re planning on doing a small, one day, jQuery Conference the next day after the Ajax Experience. This will be the perfect opportunity for you to meet the jQuery team and ask any nagging questions that you have. We’ll also be giving a number of talks about specific aspects of jQuery. We’ll have more details about this soon.

jQuery UI

Today, we’re also pleased to announce a secret project that we’ve been working on: jQuery UI. This project, being written by Paul Bakaus, is a whole new Drag & Drop library being developed from the ground up with speed and extensibility taken into consideration. Additionally, great care is being taken to have the code be fully documented and tested — allowing many other developers to use and help extend it.

This library will contain full code for Draggables, Droppables, Sortables, Resizables, and a Slider.

You can take a look at some of Paul’s early work in the SVN repository.

Funding and Thank You

The new jQuery UI library marks a new step for the jQuery project: This is a piece of code whose development we’re sponsoring using money donated by you, the jQuery users!

This is being made possible in two ways: first by your continued support and donations to the jQuery project, and second by a generous server donation by Media Temple. This is allowing us to focus our financial resources on other projects that’ll benefit everyone the most.

So I’d like to take this opportunity to request additional donations to help us continue funding exciting new work that you’ll be able to use in your web sites. Any help will be greatly appreciated.

Amount in $

Once again, I’d like to thank the jQuery team and everyone who has helped to make this release possible. It’s been a lot of work, but I hope you’ll be as pleased with this release as we are. Thank you — and thanks for using jQuery!

37 thoughts on “jQuery 1.1.3: 800%+ Faster, still 20KB

  1. Sharandeep Brar on said:

    Thank You Guys ! You are doing awesome work. Looking forward to jquery UI.

  2. Denis Ignatenko on said:

    jQuery UI sunds good. What about bridge for ExtJs? Is it now compatible or need to be fixed?

  3. Riddle on said:

    Thanks guys, fantastic job!

    I can’t wait to jQuery 1.2, the roadmap you’ve posted looks very promising.
    And I’m really looking forward to jQuery UI and think that it will be a great step over Interface, which can be seriously buggy in some enviroments. I think ‘script.aculo.us’ now :)

  4. Chen Zhe on said:

    Great job!
    I am currently learning using jQuery. It’s so amazing that I’ll never wish to write those ugly Javascript.jQuery is so awosome.
    And you Docs are also easy to learn. I have already made some useful scripts with the Great jQuery.
    Now, here comes 1.1.3, and it’s even better.It’s just incredible!
    Finally a BIG THANKS from China!

  5. Jonah Stagner on said:

    Oh heck yeah! Some very welcome bug fixes in this release, and speed enhancements to boot! As soon as I integrate this with my primary dev project and make sure that all is well, I’m gonna throw another donation your way :) Thank you!!!!

  6. Noah Lazar on said:

    It looks like a regression popped up with this release. IE6 and IE7 no longer animate their opacity, which affects the fadeIn(), fadeOut(), and animate() functions. Other supported browsers appear to be fine. A simple reduction can be seen here:
    http://noahlazar.com/jquery/fade.html

    I thought I should mention this on the blog while the dev server is being dugg — I’ll submit a new ticket as soon as it’s back up.

  7. Karl Swedberg on said:

    Noah, thanks a lot for the heads-up on the opacity problem. Brandon Aaron has committed a patch to the jQuery svn, so if you can grab the latest svn build, that should solve it for you.

  8. Marc on said:

    This is absolutely great… I’m really lokking forward to testing this version. Thanks to all people involved!

  9. Noah Lazar on said:

    Karl, I’ll check out the latest build. Thanks for the update (and Brandon for the patch)!

  10. Pingback: commadot.com » jQuery 1.1.3 and beyond

  11. Most popular is not the same as most used. :)

    I look forward to the day we can completely drop support for IE 5 and 6. And let’s hope that Safari comes up to speed quickly on Windows.

  12. Matei "Ambient.Impact" Stanca on said:

    In response to ReyBango:
    http://jquery.com/blog/2007/07/01/jquery-113-800-faster-still-20kb/#comment-32818

    The W3Schools stats are not even close to accurate for the internet at large. Their stats are based on the traffic they get on their servers, which are primarly visited by web developers, not the general population. The general stats I’ve heard in the “real world” of browsers shares put Firefox (as great as it is – love it) is only at 15% or so. IE (and mostly 6, not 7) still takes up 70-80% of the market. That’s the reality, not what you’re getting from W3Schools, which only represents a minority of web surfers.

    So, the bottom line, that’s not a real world statistic that you’re relying on, and it’s very inaccurate.

  13. Rey Bango on said:

    @Matei: Whats with the aggressive tone? Did i say something to make you angry or upset?

    Anyways, back on topic, we are constantly checking stats from our own clients and comparing notes. We also use 3rd party stats (eg: w3schools) because they offer a different perspective. I wanted to list at least one public source that we use to gauge browser popularity and w3schools is the one I chose. There’s nothing wrong with that at all.

    We’ve tested jQuery across every major browser and ensured enhanced performance accordingly and we make a concerted effort to balance that performance across all browsers. Our performance in IE is stellar because we do realize they have the largest user base. So I think you’ve jumped the gun a little with this whole browser stats thing. We’re all professionals on the jQuery team, some working for some very large companies and are very in tune with browser market shares.

  14. __note on said:

    I think changes will be useful and I believe jQuery has become more faster.
    Good work

  15. Struppi on said:

    ok, I get the problem with 1.1.3 – I override the useragent String and then it seems the Framework didn’t work anymore

  16. Webstandard-Team on said:

    Nice job John, its pretty fast. I did some jQuery 1.1.3 tests with IE, Firefox, Opera, Netascape, Safari, Flock & Co. at Windows XP & Vista, Mac OS X. Those comparisons confirm your results.

  17. Matei "Ambient.Impact" Stanca on said:

    @Rey Bango (http://jquery.com/blog/2007/07/01/jquery-113-800-faster-still-20kb/#comment-32932)

    It wasn’t my intention to come off as aggressive when I typed that. If I offended you, I’m sorry. I was merely concerned with the topic of browser stats, because you only mentioned W3Schools and no other source. I’ve come across people that cite that as their primary source, and it’s a bit worrying when it happens. Again, my apologies for the apparent tone of my previous post.

  18. Rey Bango on said:

    @Matei: Thanks for the reply. I totally understand your concern and its extremely important to me and the team to hear your feedback and opinions. We also want to reassure everyone that we do our best to look at several sources when identifying key target areas for the lib (eg: browser penetration). We know that at the end of the day, you guys need to be able to work effectively and we try hard to ensure that when you use jQuery, that the library won’t be a stumbling block for you.

    Again, thank you for your feedback and certainly no offense taken. Now, if you would’ve called me a “fat, chunky monkey” well, then there might be some trouble!! ;)

  19. resetstudio on said:

    Hi! Great speed improvement, but i’m experiencing some issues with “unbind” method… it works great if i don’t specify the event to unbind ($(eleme).unbind();) but if i specify it ($(elem).unbind(“hover”);), that will not work (in 1.1.2 works perfect) … is somebody experiencing the same?

  20. Don’t you think that SlickSpeed should give fair results?
    I mean… the results shown on SlickSpeed go for entire sums of consumed time, ignoring those tests where at least one framework failed!
    There should be another row of results saying “All-valid results” or something that will add the time only when all the frameworks succeded!
    Of course, another row will be useful – Number of tests failed!

  21. vijay on said:

    Hi,
    Jquery 1.1.3.1 is too slow in addClass and removeClass. It was good in previous version. In my scenario I’ve a table of 500 rows to which css classes are to be added like. $(#tableNAme tr).filter(“some rows on selector”).addClass(“Shown”).removeClass(“unShown”).
    This is taking lot of time with 1.1.3.1 which was not the case with previous jquery library jquery 1.1.2 .

    I was not able to figure out whats the problem. I thought jquery 1.1.3.1 would be backward compatible, but it was not because most of my framework which was working fine with previous version was broken. I’m hoping that the jquery 1.1.4 will solve problems which I’m facing with current version .

  22. Pingback: zachleat.com {web} » JavaScript Frameworks and JSF