Minor API Change in 1.0.2

Posted on by

I forgot to mention in the 1.0.2 release notes, the other day, that there was a minor API change. This was a mistake, as we should’ve held off on making an API change until the next major release (jQuery 1.1).

As summarized by Steven Wittens, here is the premise behind the change:

In jQuery 1.0.2, the first argument to the ‘success’ callback has been changed to return the actual data rather than the XMLHttpRequest object. Use the ‘dataType’ argument to $.ajax() to control how the data is returned. Note that jQuery can now parse XML, JSON and JavaScript for you this way.

jQuery 1.0.1

$.ajax( {
  success: function (xmlhttp) {
    var data = $.httpData( xmlhttp );
    // 'data' holds the response data from the server

jQuery 1.0.2

$.ajax( {
  success: function (data) {
    // 'data' holds the response data from the server

Thanks, Steven, for the synopsis – and sorry, everyone, for the inconvenience!

jQuery 1.0.2

Posted on by

jQuery 1.0.2 is now ready for consumption! This release is a huge bug fix release – and it is highly recommended that you upgrade right away. As always, if you spot a bug, please add it to the bug tracker.

In addition to having a better test suite, a big push for this release was to have better cross-browser compatibility for common tasks (such as AJAX operations). Functionally, however, no major features have been added to this release (although, expect some new code come 1.1).

I’d like to take this opportunity to introduce everyone to Jörn Zaefferer. Much of this release was made possible by him. He’s responsible for completely overhauling the test suite (it now has over 260+ tests!) and for fixing the majority of the current bugs and enhancements (over 60 of them!). If you want someone to thank for this release, it should be him.

Download Now:

Tickets Closed:

The full set of bugs, or enhancements, that were closed with this release:

  1. Cross Browser Dimensions
  2. I.E. text rendering at full opacity
  3. FadeIn/FadeOut breaks if opacity is already set
  4. css(‘top’) and css(‘left’)
  5. fx.custom() doesn’t work for opacity in IE
  6. Opacity doesn’t work in IE
  7. jQuery IE6 bug with base href
  8. [PATCH] IE Opacity issues resolved
  9. Namespaced Selection of Elements and Attributes
  10. append(html) function fails, if html is a table fragment and begins with whitespace
  11. IE weirdness on semi-opaque anti-aliased text, a small fix
  12. a fix for getAttribute(‘action’) in forms
  13. IE throws errors for $(this) in nested each loops
  14. IE5 scripting error
  15. Leak for Mozilla/Firefox browsers (using addEventListener)
  16. filter seemingly not operating correctly
  17. $(‘node1/node2’) gives error when node1 is empty
  18. add does not merge sets
  19. extend not(jQuery) to be able to operate with sets
  20. document the behaviour of $(“
  21. $.load requires a callback
  22. [PATCH] $().hover error in firefox
  23. Attribute values in :not()
  24. children() may return nothing
  25. IE throws errors for $(this) in nested each loops
  26. ajax summary / todo list
  27. Safari crash in test suite
  28. wrong safari detection
  29. different behavior for next() in IE and Firefox
  30. [PATCH] IE Memory Leaks from event system
  31. Different Encodings for AJAX
  32. IE 6 removes whitespace, eg. when using append
  33. hover() mouseout bug
  34. $.postJSON
  35. Params to $.get() are appended wrong to querystring,
  36. calling load without arguments throws exception
  37. Returning script tag in IE fails
  38. Unavailable response header breaks Firefox 1.0
  39. ifModified arg to $.ajax()
  40. Timeout as Argument to AJAX
  41. Replacement :input, :radio, etc.
  42. Ajax refactoring
  43. jQuery’s toggle(); gets mixed up with moo.fx’s toggle();
  44. Error Parsing Opacity
  45. .constructor == Function is not enough
  46. [PATCH] $().hasClass()
  47. Create IE 5.0 Support Plugin
  48. [PATCH] innerWidth and innerHeight fails in IE with no borders
  49. sibling() returns siblings and the subject
  50. IE fails with #element/* expressions
  51. XHTML Tables
  52. wrap breaks when the HTML structure contains text
  53. Fix for attribute *=, ^=, and $= in cases where special attributes.
  54. `]` breaks selectors
  55. Including jQuery again overwrites already registered document-ready events
  56. Expression generates error in FireFox
  57. support of ancestor:: axis
  58. prev() does not work as expected
  59. nth-of-type
  60. Animate function release
  61. attr(‘checked’, true) doesn’t work

Sponsored jQuery Development

Posted on by

Excellent news today: Paul Bakaus has received sponsorship from his employer, New Identity AG, to contribute back to jQuery project. He’s being given a chunk of hours under which he is sponsored to develop jQuery-related code. All of this is going straight back in to the community.

This is in addition to the fact that New Identity AG is in the process of making some major switches over to using jQuery as their primary JavaScript library. They have a number of high profile clients that they develop for.

Paul is going to begin by undertaking a number of tasks that have been “in the works”, namely: A Prototype support plugin, Cross-browser utility methods, and improved functionality and bug fixes for Interface.

This is a clear sign of a couple things: That jQuery’s German user-base is growing quite well, that development will move at an even quicker pace now, and that Interface is becoming an integral part of the full “jQuery package.” Expect to see some important updates in the pipeline, soon.

jQuery Interviews

Posted on by

People are really starting to pick up on the “jQuery thing”! I’ve given a number of interviews and presentations lately concerning jQuery. Here are most of the interviews: One for a magazine, two for online articles, and one podcast. Enjoy!

eWeek: jQuery Eases JavaScript, AJAX Development

As more developers adopt the practice of AJAX-style development to create more interactive applications, they are looking for tools to make the job easier.

One such tool is jQuery, which some users say makes AJAX (Asynchronous JavaScript and XML) development cleaner by making using JavaScript easier. JavaScript is notoriously difficult to work with, said a group of experts at Microsoft’s Lang.Net symposium in early August, in Redmond, Wash.

Drupal Podcast: jQuery Author John Resig

We’ve just posted the 21st episode of the Drupal Podcast! It is an interview with JQuery author, John Resig. We talk about what JQuery is, how it works, and how it will fit into Drupal.

.net Magazine: John Resig of jQuery

Most of the “big” updates to jQuery are going to be community related. I’m now working with a number of international jQuery users who will be translating the documentation and the site’s blog posts into other languages; most likely German, Chinese, Spanish, Italian, and French to start with.

Additionally, since jQuery has an incredibly easy plugin architecture, I’m also working on improving the overall developer community and organization – think Sourceforge for jQuery.

InfoWorld: JavaScript, .Net developers aided in separate projects

In the JavaScript arena, the open source jQuery project provides developers with a JavaScript library to improve the quality of Web applications. JQuery makes it easier to write JavaScript and AJAX (Asynchronous JavaScript and XML), said John Resig, lead developer of jQuery and also an author.

“The big thing that makes it different form other JavaScript libraries is it doesn’t really try to impose itself on you,” Resig said. Developers should be able to write shorter code than before while still getting equal if not better functionality, he said.

jQuery 1.0.1

Posted on by

The first post-1.0 release is now ready – and (as you would probably expect) it’s a bug fix release. I’ve been working on fixing up some of the most pressing 1.0 bugs during the past couple days and I think it’s ready to go. So, without further ado – here’s jQuery 1.0.1:

I definitely recommend that you upgrade to this release since it’ll only help make your development go easier (I expect that the next few point releases will be rather feature-lite). Here’s what’s been fixed in this release:

There’s a couple more, less-pressing, bug fixes waiting in the queue, with a bunch of nice enhancements coming up soon (especially for the AJAX functions, thanks to Will Jessup). The next move is going to be putting the finishing touches on the API documentation and moving proj.jquery.com to jquery.com.

As always, if you spot any bugs, please feel free to post them to the bug tracker (it helps me to keep tabs on everything, and keep it organized).

Update: I’ve applied two hot fixes to this update, both of which fix big problems with this bug update. That’s what I get for releasing this at some awful time in the morning. Please make sure you get the latest source from this page.

jQuery 1.0

Posted on by

I’d like to take this opportunity to announce the brand new jQuery 1.0! A lot of work has gone into this release. A lot of bugs fixed, a ton of new features, and a complete overhaul of how the jQuery development process is run.

In reality, this release is so large, it’s going to take a couple days to release it (this includes a new version of the jQuery web site). So bare with us as we make the transition over to full release. There’s some kinks that’ll have to be worked out (namely, finalizing the new documentation) but it’s all in the pipeline and will be ready within the next couple days.

For now, here are some relevant links to get you started:

If you want to build your own copies of jQuery, you can check it out of Subversion and build it from the command line. You can get the latest jQuery by doing:

svn co svn://jquery.com/home/jquery/src/jquery

There’s so much more to come. I’ll be doing a post every day this week detailing some aspect of jQuery 1.0 along with some screencasts demonstrating what you can do with all the new code. Please, if you spot any bugs, file them in the bug tracker:

I’d like to thank everyone who made this release possible. It’s been a lot of work, but the journey is only just beginning. I can’t wait to delve into some of the very exciting advances that we have planned. Happy Coding!

Update: Here’s a fun fact. jQuery 1.0 has been released nearly one year after it was first conceived as a post in my weblog. Funny how those things work.

Update: The very cool Visual jQuery site has also released a preview version of the new documentation in its sharp style. The final release of their updated docs will be coming in the next couple days.

jQuery Boston

Posted on by

If there are any jQuery users here in Boston, MA – I’m going to be giving a presentation about jQuery on the 23rd for the local Drupal group. I’m not sure if it’ll be recorded and/or transcribed – but I’ll be sure to throw any slides or examples online after its done.

More info about the event can be found on the Drupal website.

Also, I’d love to be able to do a jQuery meetup sometime, maybe in association with a big conference (OSCON, AJAX Experience?) But that’s for another post.

YShout – Real-time Chat with jQuery

Posted on by

View of the Chat Area

Yuri Vishnevsky has just released a new AJAX chat application that makes great use of jQuery. This application allows you to embed a chat area into a section of your web site and have it update in real-time as users chat with each other. It’s really slick and works quite nicely.

YShout includes a bunch of nice features:
– Unicode Support
– An administration area
– Flood control
– and a history viewer

You can view demo of it in action on the project page.

YShout Admin Area

Probably the most interesting part, from the perspective as a jQuery user, is that this isn’t the first version of his application – it’s the third – and is the result of a complete re-write from Prototype to jQuery. Yuri stated that the reason for this switch was that “the file size coupled with the method chaining” together with the “intuitive syntax”.

If you like this application, you should Digg Yuri’s article, as I’m sure a lot of other webmasters would love to put this on their web sites.

Your own Digg Spy with jQuery

Posted on by

Digg-like Spy with jQuery

Remy Sharp has just released a new jQuery plugin which allows you to emulate the, very cool, Spy feature of Digg.

For those who are unfamiliar, the Spy feature of Digg has stories fade in, in real time, as people vote, moderate, or comment, on them. It’s a very slick feature for checking the pulse on the Digg community.

Remy has taken that Digg Spy concept and created a jQuery plugin that automatically pulls new items (using AJAX) from the server and gracefully fades them in. Additionally, it fades out the old items that don’t matter as much, any more.

As proof of how easy it is to use this, another Digg user has already taken the plugin and implemented it on his own site, which is quite impressive given the short amount of time that this has been out.

If you like this plugin, you should Digg Remy’s article, as I’m sure a lot of Digg users would really like their own Spy to play around with.

3d Universe with jQuery

Posted on by

Universe Screenshot

Will Jessup has just release a great demo of what’s possible with jQuery (and Javascript in general): A 3d model of the universe. Try moving your mouse vertically around the screen to see the universe at different angles, horizontally to make it rotate faster. All the images are courtesy of NASA.

Will used a lot of techniques to really simulate the 3d experience correctly:

  • He adjusts the opacity and z-index of the images based upon the depth of the element.
  • The height and width are also adjusted dynamically – but are all laid out using fontSize and EMs, allowing you to also simulate depth-of-field with text (in addition to static images or elements).
  • The background moves based upon the speed, and direction, of rotation.

Also, take a look at his code for specific caching optimizations used (like saving a reference to a single jQuery object and calling it over and over, rather than re-querying on every rotation).

Be sure to digg this up as it’s a really great example of the power of jQuery.