jQuery 1.4 Alpha 1 Released
Hot off the presses: jQuery 1.4 Alpha 1 is released! This is the first alpha release of jQuery 1.4. The code is stable (passing all tests in all browsers we support), feature-complete (we’re no longer accepting new features for the release), and needs to be tested in live applications.
Grab the code:
- Regular: http://code.jquery.com/jquery-1.4a1.js
- Minified: http://code.jquery.com/jquery-1.4a1.min.js
NOTE: If you’re using jQuery 1.4a1 and you run into an error please make sure that you’re using the regular version of the code, it’ll make it easier to spot where the error is occurring.
How can I help?
To start, try dropping the above un-minified version of jQuery 1.4a1 into a live application that you’re running. If you hit an exception or some weirdness occurs immediately login to the bug tracker and file a bug. Be sure to mention that you hit the bug in jQuery 1.4a1!
We’ll be closely monitoring the bug reports that come in and will work hard to fix any inconsistencies between jQuery 1.3.2 and jQuery 1.4.
What to Watch For
There are a few areas in jQuery that have seen extensive changes since 1.3.2 was released:
- live was drastically overhauled and now supports submit, change, mouseenter, mouseleave, focus, and blur events in all browsers. Also now supports context and data.
- append, prepend, etc. have been heavily optimized.
- add has been adjusted to always return elements in document order.
- find, empty, remove, addClass, removeClass, hasClass, attr, and css have been heavily optimized.
Full details concerning the release are forthcoming – for now we just need your help in catch regressions. Some more details can be found in John Resig’s keynote at the 2009 jQuery Conference.
Note: There are still a few open bugs that we will be reviewing before jQuery 1.4 final is released.
With your input we should be able to produce a solid release. Right now we’re looking to push out at least one more alpha before the holiday season and a final release candidate early in January. Thanks for your help in reviewing jQuery 1.4a1!
Too late I guess, but I would love to see $.getJSON() upgraded to support error and beforeSend callbacks, as well as some of the other features of the rest of the $.ajax() methods. This plugin seems to have it right: http://code.google.com/p/jquery-jsonp/
Thanks for the work on 1.4, all.
I’m most excited about the .live changes. That makes life a lot easier.
:)
Thanks to all the contributors.
Thanks for this great release. I will test it in some of my actual projects!
@slowernet: On the jquery-dev list Julian Aubourg (the author of that plugin in question) has been working on a larger rewrite of jQuery.ajax() that’ll make that possible (while making it much easier to extend jQuery.ajax as a whole). We slated this for post-1.4 because it’s going to be a lot of work and it may cause a lot of code to change – don’t want to break code this close to release. Definitely look for this to land pretty soon after 1.4 comes out, though!
http://groups.google.com/group/jquery-dev/browse_thread/thread/314deb5ad4056621
Great!
Are there any backward-incompatible changes? Or should everything in the documentation work with this (pre-)release?
@Michael: No major backwards-incompatible changes. I mentioned some of the areas where there could be (unintentional) problems above but if you see anything breaking then we definitely want to fix it right away.
@slowernet, I agree that jquery-jsonp is a great library for people to use while waiting for the new ajax stuff. I’m using it for a Twitter tool and it’s fantastic.
I’d also like to mention that in 1.4, the jQuery.param method has been completely rewritten. I have created a complimentary jQuery.deparam method as part of my jQuery BBQ plugin, with a live example here:
http://benalman.com/code/projects/jquery-bbq/examples/deparam/
Trying it out in a new ASP.NET MVC project now.
Awesome!
This new minified jquery 1.4a1 is 88kb, while 1.3.2 was 52kb. If they were minified with the same process, is this 70% size increase (dunno how many gzipped) going to stay for the final version? If not, what is the target size increase?
I find it hard to get all the information I need from a bunch of slides that have limited information. Is there going to be a more detailed document about the changes?
In the slides, I see mostly speed and code optimizations. 1.3 had a few new features. I personally love this as jQuery is very complete for me. I also like the reduction in size.
Does this mean jQuery is feature complete? Are there new features planned for a future release?
(Oh, In was wrong about the size, confused the old version’s size with the new one :) )
Excited about this release and your changes to Live. jQuery in general is just such a fantastic tool, has made my life as a web developer/designer so much easier (and quicker). Many thanks :)
@csulok: I’ll quote a comment that I made over at Hacker News addressing the same issue:
@Blaise: There will certainly be features for future editions. For example, for post-1.4 we’re already working on ways of making jQuery work better on mobile devices, making it easier to develop Firefox extensions, and making the core more extensible. There will always be room to grow but you can feel safe knowing that we’re working hard to keep the feature set lean and right.
@JohnResig In the code for the jQuery .empty() function, you loop through all of the child elements and remove them. Is there a reason for this? It seems like it would be a lot faster to just set the element’s innerHTML to “” since you are removing all of the children. Just wondering!
.live() was awesome.
@Devon: Mostly because innerHTML can be so buggy – and it doesn’t work across all document types. It’s definitely something that we can check out but it’ll be a bunch of additional logic.
Thank you for the great work. We are currently testing the neu Version packed with Dean Edwards JS compressor.
Please take this bug in account for the next release! It’s annoying bug and it relatively easy to fix :
http://dev.jquery.com/ticket/5505
Here are the tests that fails:
http://pastie.org/728826
Thanks for that great update, specially new live events :)
Info:
The regular version has a missing semicolon in line 3691
filter = style.filter || jQuery.curCSS( elem, ‘filter’ ) || “”;
Well you already have the .html() and .text() functions. Isn’t the logic already written in these functions?
@Zanda: A fix for that has already landed in jQuery core – thanks!
@Devon: That’s a good point – we do have logic for that in .html(), added in just this release. I’ll re-examine the issue to see if it provides any tangible benefits.
@JohnResig : how can I trust this fresh new release to be used in production ? The ‘change’ cross-browser support is just what I need, but how to be sure it’s not going to make the rest of my dev fall down ? I know it’s alpha release, but changes don’t seem to be dramatically deep, no ?
Thank you for the great work. We are currently testing the new version and some ‘parsererrors’ error occurs when loading our web templates via $.ajax in a json datatype, the code with version 1.3.2 works well.
Hello.
Why do not you implemented the language settings of the browser and the browser Chrome in the object browser like that? :
language: navigator.language? navigator.language : navigator.userLanguage,
chrome : /chrome/.test(navigator.userAgent.toLowerCase())
Thank you in advance
Hello
i want to be more Familiar with your Develop team!
is this possible?
What are the API changes, if any?
(I need to update my cheat sheet)
Great news! Seems like there are no much API changes but performance oriented optimizations were made.. interesting
Congratulations! I look forward to this release and will be investigating the alpha shortly. Lots of good improvements this round.
I love that JQuery introduced modularity in the version 1.3 can we see in the future auto compressor and packer for all the modules? So we can choose only the modules that we are using not all the library.
considering that 1.4 is backwards compatible with 1.3, will it work with jqueryui 1.7.2?
@JohnResig I have blogged about my findings with the jQuery.empty function. It turns out that innerHTML (through jQuery 1.4 .html()) is faster than .empty in all browsers except Firefox. But I did come up with a fast method of emptying – in some cases over 10 times faster than the current jQuery version. The fastest way to do this is by shallow cloning the parent and replacing it. Check out the post here: http://devongovett.wordpress.com/2009/12/12/how-to-make-jquery-empty-over-10x-faster/.
@matt I have noticed no problems with jQuery UI thus far, but I haven’t tested anything extensively.
if it doesn’t work for you anywhere 1.3.2 does, then it should be reported.
Wow! I am happy about the “context” parameter of the closest()-method. Thank you for adding. This makes writing event handlers easier.
Pingback: jQuery: » jQuery 1.4 Alpha 2 Released