Monthly Archives: January 2011

This release has been a long time coming and has been a real team effort. Please take this opportunity to thank members of the jQuery Team and the jQuery bug triage team for their help in getting this release out the door.

Downloading

As usual, we provide two copies of jQuery, one minified and one uncompressed (for debugging or reading).

A full schedule of our upcoming releases can be found on our roadmap. Right now we’re planning on doing major jQuery releases more frequently (likely a couple times a year, rather than once per year).

So, without further ado, what’s changed in jQuery 1.5?

Ajax Rewrite

Easily the largest change in this release is the complete rewrite of the Ajax module in jQuery. This rewrite helps to fix a lot of gaps that existed in the old Ajax system along with providing a higher level of consistency across the API.

Perhaps the largest change is that a call to jQuery.ajax (or jQuery.get, jQuery.post, etc.) now returns a jqXHR object that provides consistency to the XMLHttpRequest object across platforms (and allows you to perform previously-impossible tasks like aborting JSONP requests).

In addition to a more consistent API the Ajax system is now much more extensible – allowing you to attach all sort of data handlers, filters, and transports. These changes should open up a whole realm of new Ajax plugins that can take advantage of this extensibility. More information can be found in the Extending Ajax documentation. The team is actively soliciting feedback on the Ajax extensibility API and if you have any feedback please feel free to direct it to the Developing jQuery Forum.

Deferred Objects

Along with the rewrite of the Ajax module a new feature was introduced which was also made publicly available: Deferred Objects. This API allows you to work with return values that may not be immediately present (such as the return result from an asynchronous Ajax request). Additionally it gives you the ability to attach multiple event handlers (something that wasn’t previously possible in the Ajax API).

For example, the following is now possible with jQuery’s internal Ajax API:

jQuery now exposes a new way in which you can create and modify a clone of jQuery – all while still taking advantage of the full jQuery API. For example, you could use it to override native jQuery methods without actually affecting the methods that other users would interact with – or even create encapsulated APIs for your plugins that avoid namespace collision.

Here is a sample of adding a method to a jQuery sub so that it isn’t exposed externally:

More information about jQuery.sub() can be found in the API documentation.

Note that if you’re looking to use this for plugin development, you should first strongly consider using something like the jQuery UI widget factory which manages both state and plugin sub-methods. Some examples of using the jQuery UI widget factory to build a plugin.

Adjacent Traversal Performance

In this release we’ve also been able to improve the performance of some commonly-used traversal methods: .children(), .prev(), and .next(). The speed-ups that we’re seeing are quite substantial (potentially many many times faster, depending upon the browser).

Build System

Finally, we’ve made some changes to jQuery’s internal build system. We’ve worked to standardize all of our build process upon the excellent server-side JavaScript environment: NodeJS. We especially appreciate this as we’re able to reduce our dependency upon legacy Java/Rhino systems and focus more squarely on up-and-coming JavaScript environments.

Additionally with this switch we’ve moved to using UglifyJS from the Google Closure Compiler. We’ve seen some solid file size improvements while using it so we’re quite pleased with the switch.

Thanks!

As always we want to thank everyone that helped with this release – without your contributions this release would not have been possible. If you have any questions or spot any bugs please submit your issues to the jQuery bug tracker.

When we added comments to the API documentation last January, the idea was to provide a place for members of the community to augment the documentation with their own tips or real-world examples. While this system worked well when it was first introduced, it has become increasingly difficult to manage the enormous amount of spam that it has attracted. We also found that many people were trying to use it as a support system, which it was not designed to do. Because of this, we’re planning to turn off comments on the API site later this week in favor of more directed feedback options:

If you need help debugging your code or understanding how something works, or if you’re interested in helping others, head to the jQuery Forum or visit #jquery on irc.freenode.net.

If you notice an error or omission in our documentation and want to help us improve it, we’ll provide a simple contact form for you to fill out.

Once comments are disabled, members of the jQuery API subteam will scour old comments for any information that we can, with the commenter’s permission, roll into the documentation proper.

Observations and Lessons Learned

Even though we’ll be turning off the comment system, having it on the site the past year was a valuable experience. Here are just a few of the observations and lessons we noted along the way:

When bug reports, feature requests, and calls for help were left in comments, instead of in the bug tracker and forums, they didn’t receive the attention they deserved.

When well-meaning people replied to requests for help in the wrong channel, they inadvertently contributed to the fragmentation of the community.

On the other hand, when people introduced and responded to topics in the appropriate channel, there was a much greater likelihood of successful resolution.

Instructions for writing appropriate comments were often overlooked, regardless of their size, location, or wording.

The value and accuracy of on-topic comments tends to wane over time as bug-fixes and enhancements are applied.

Knowing how and when to “prune” comments was a particularly tough challenge. For example, after we revised the wording in an entry to address a comment thread, we felt that deleting the thread was appropriate. Yet, we also regretted not being able to properly thank the people who helped out without contributing to comment noise.

If a plugin author plugs their project in the comments, is it spam? We didn’t have a good answer to this question, and many others like it, but that didn’t keep us from spending a lot of time stressing over the Right Way™ to handle these situations.

Thanks to the jQuery API Sub-team

Finally, I’d like to take this opportunity to thank those who have volunteered to commit their valuable time and resources to maintaining and improving the API documentation. The following people are members of the recently formed jQuery API sub-team:

Adam Sontag

Addy Osmani

Alex Sexton

Dan Heberden

Dave Methvin

Eddie Monge

Jonathan Chaffer

Karl Swedberg

Paul Irish

Richard Worth

Rick Waldron

Scott González

Sean Koole

Todd Parker

Additionally, thanks to all of those in the jQuery community who have contributed with their suggestions, critiques, and encouragement.

We’re nearing the final release of jQuery 1.5 – and we’re pleased to announce the release of the first release candidate! Barring any major bugs this should be the code that we end up shipping for jQuery 1.5 (which will be happening on January 31st).

The final release notes and documentation will be coming with the final 1.5 release.

jQuery 1.5 Release Candidate 1

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.5 RC 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

Happy 5th Birthday to jQuery! jQuery was released on January 14th, 2006 today marks its 5th year of development!

To celebrate the occasion we’re releasing the first beta release of jQuery 1.5! We’re planning on having a final release candidate within 10 days and a final release by the end of the month.

We’d also like to announce three new additions to the jQuery core development team: Julian Aubourg, Colin Snover, and Anton Matzneller. All three of them have been major contributors towards the 1.5 release – providing significant code contributions, bug fixes, and triaging. Please take this opportunity to welcome them aboard!

Additionally we’d like to take take this opportunity to thank all the members of the jQuery community that have helped to get this beta release out – especially all the members of the bug triage team.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

So without further ado – jQuery 1.5 Beta 1!

jQuery 1.5 Beta 1

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.5 Beta 1.

jQuery 1.5 Beta 1 Change Log

This is a concise change log – full release notes will be coming with the final 1.5 release.

Rewrite of the Ajax module by Julian Aubourg. This is the most significant change in this release and brings a number of performance, stability, and feature improvements to $.ajax. More information can be found here#7195

Removed the possibility of expando collisions when using noConflict() (V8 is fast!). The expando string now uses a random number + jQuery version to differentiate between instances of jQuery instead of millisecond clock time. #6842