Blog » jQuery 1.4.2 Released
Posted February 19th, 2010 by John ResigjQuery 1.4.2 is now out! This is the second minor release on top of jQuery 1.4, fixing some outstanding bugs from the 1.4 release and landing some nice improvements.
I would like to thank the following people that provided patches for this release: Ben Alman, Justin Meyer, Neeraj Singh, and Noah Sloan.
Downloading
As usual, we provide two copies of jQuery, one minified (we now use the Google Closure Compiler as the default minifier) and one uncompressed (for debugging or reading).
- jQuery Minified (24kb Gzipped)
- jQuery Regular (155kb)
You can feel free to include the above URLs directly into your site and you will get the full performance benefits of a quickly-loading jQuery.
Additionally you can also load the URLs directly from either Google or Microsoft’s CDNs:
- http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
- http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js
New Features
A full list of the API changes can be found in the 1.4.2 category on the jQuery API site.
In this release we’ve added two new methods: .delegate() and .undelegate(). These methods serve as complements to the existing .live() and .die() methods in jQuery. They simplify the process of watching for specific events from a certain root within the document.
For example:
$("table").delegate("td", "hover", function(){
$(this).toggleClass("hover");
});
This is equivalent to the following code written using .live():
$("table").each(function(){
$("td", this).live("hover", function(){
$(this).toggleClass("hover");
});
});
Additionally, .live() is roughly equivalent to the following .delegate() code.
$(document).delegate("td", "hover", function(){
$(this).toggleClass("hover");
});
What’s Changed?
There has been some large code rewrites within this release, both for performance and for fixing long-standing issues.
Performance Improvements
As is the case with virtually every release of jQuery: We’ve worked hard to continue to improve the performance of the code base, making sure that you’re provided with the best performing JavaScript code possible.
According to the numbers presented by the Taskspeed benchmark we’ve improved the performance of jQuery about 2x compared to jQuery 1.4.1 and about 3x compared to jQuery 1.3.2.

Specifically we’ve improved the performance of 4 areas within jQuery:
- The performance of calling .bind() and .unbind(). (Ticket)
- The performance of .empty(), .remove(), and .html(). (Ticket)
- The performance of inserting a single DOM node into a document. (Ticket, Additional Commit)
- The performace of calling
$("body"). (Commit)
While comprehensive benchmarks like Taskspeed can be interesting if deconstructed into individual sub-tests for further study, as a project we tend to stay away from using them as an accurate measure of true, overall, library performance. Considering how many aspects make up a library, not to mention the different techniques that they offer, cumulative results rarely reflect how an actual user may use a library.
For example, we saw significant overall performance speed-ups in Taskspeed simply by optimizing the $("body") selector because it’s called hundreds of times within the tests. Additionally we saw large gains by optimizing .bind() and .unbind() by a fraction of a millisecond – an inconsequential amount – especially considering that any cases where you would bind hundreds of events you would likely want to use .live() or .delegate() instead.
We’ve collected some results from the other major libraries as well but are less interested in those results and far more interested in the performance improvements that we’ve made relative to older versions of jQuery itself.
We will continue to work on optimizing the jQuery code base – indefinitely. It’s always a major concern for us to try and provide the fastest JavaScript/DOM-development experience possible. And yes, there will likely always be ways to gain additional performance – either through internal optimizations or by pushing critical functionality off into browser-land for standardization.
Event Rewrite
The largest internal changes have come through a much-needed structural rewrite of the events module. Many quirky issues related to event binding have been resolved with these fixes.
Namely event handlers are no longer stored as object properties in jQuery’s internal object store (with metadata attached to the handlers). Instead they’re now stored within an internal array of objects.
If you’ve ever had the opportunity to play around with .data("events") on a jQuery element you would find that it returns an object with all the event types currently bound, within it.
To enumerate some of the changes that have occurred during this rewrite:
- It’s now possible to bind identical handlers with different data, namespaces, and event types universally.
- Execution of event handlers will continue after one handler removes itself (or its sibling handlers).
- We no longer attach data/namespace information directly to the event handlers (only a unique tracking ID).
- We no longer use proxy functions, internally, to try and encapsulate handlers.
- Execution order of events is now guaranteed in all browsers. Google Chrome had a long-standing error in their object-looping logic that has been routed around.
As a side-effect of these changes we had to change the newly-exposed special add/special remove APIs in order to accommodate the new event data objects. Ben Alman is in the process of writing up a large tutorial on jQuery’s special event system and we will be making additional announcements when that occurs.
Bug Fixes
There were a total of 40 tickets closed in this minor release. Some relating to differences between jQuery 1.3.2 and jQuery 1.4.x, some fixing long-standing issues (like in the case of the event module rewrite).
Raw Data
This is the raw data that we collected to generate the aforementioned charts.
jQuery 1.3.2 jQuery 1.4.1 jQuery 1.4.2 Prototype 1.6.1 MooTools 1.2.4 Dojo 1.4.1 YUI 3.0.0 FF 3.5 2182 806 565 2156 1073 575 1885 FF 3.6 1352 677 519 2067 857 750 1494 Opera 983 697 222 793 678 218 1201 Safari 610 435 252 315 235 238 612 Chrome 1591 703 293 271 312 222 745 IE 8 2470 1937 1141 3045 4749 1420 2922 IE 7 4468 3470 1705 9863 10034 1737 5830 IE 6 6517 4468 2110 13499 11453 2202 7295

February 19th, 2010 at 4:34 pm
Good stuff :)
February 19th, 2010 at 5:07 pm
Nice! Keep up the great work.
February 19th, 2010 at 5:09 pm
[...] jQuery 1.4.2 Released [...]
February 19th, 2010 at 5:22 pm
Great performance work!
February 19th, 2010 at 5:28 pm
[...] mulai kecepatan eksekusi script, sampai dengan lain-lainnya, mungkin bisa dilihat lebih jelas di blog resmi dari jquery sendiri. Padahal baru saja beberapa waktu yang lalu memutakhirkan theme-theme di produk [...]
February 19th, 2010 at 5:34 pm
awesomesauce!
February 19th, 2010 at 5:48 pm
Wow, the performance improvements are overwhelming.
One question. Can anyone write good tutorial about how core of jQuery works, something like “The core of JQuery for dummies”. I think that understanding of the core.js of JQuery can help many of us to write better jQuery code or better plugins.
February 19th, 2010 at 6:02 pm
That raw data chart looks pretty crappy! would love to see the comparisons lined up in a table instead of a pre tag =]
February 19th, 2010 at 6:11 pm
Caught up with Dojo…nice work!
February 19th, 2010 at 6:25 pm
Wow !!!
I’m amazed how many times you already doubled or more the performance!!
jQuery, way to go ! :-)
February 19th, 2010 at 6:59 pm
[...] 1.4.2 has been released today and it comes with some performance bumps (aggressive ones according to Taskspeed). Benchmarks are [...]
February 19th, 2010 at 9:10 pm
I think that delegate()/undelegate() should completely replace live()/die():
- live/die can be implemented using delegate/undelegate (potential feature bloat).
- delegate and undelegate naming scheme is more consistent than live/die pair.
February 19th, 2010 at 9:33 pm
jquery.require
please :-(
February 19th, 2010 at 11:52 pm
That graph is difficult to decipher.
February 20th, 2010 at 5:17 am
[...] ??????????? (eng) jQuery 1.4.2 Released (eng) — ??????? ????????????? ????? [...]
February 20th, 2010 at 5:23 am
Nice work! Keep it up.
February 20th, 2010 at 5:45 am
Excellent!
February 20th, 2010 at 6:49 am
[...] http://blog.jquery.com/2010/02/19/jquery-142-released/ [...]
February 20th, 2010 at 6:52 am
[...] 1.4.2 Released Via Official jQuery Blog by John [...]
February 20th, 2010 at 7:15 am
[...] jQuery 1.4.2 Released [...]
February 20th, 2010 at 8:30 am
Thank you John Resig, Ben Alman, Justin Meyer, Neeraj Singh, and Noah Sloan for 1.4.2.
And John, thanks for creating this post explaining it. With examples, and charts, and thoughts on importance. All organized nicely to pour straight into my brain. I appreciate the quality.
February 20th, 2010 at 8:32 am
It seems that each minor release is still a major improvement. Good work !
February 20th, 2010 at 8:51 am
[...] jQuery Blog. Categorías: Programación Etiquetas: JavaScript, [...]
February 20th, 2010 at 9:05 am
[...] JQuery 1.4.2 Released (jquery.com) Share and Enjoy: [...]
February 20th, 2010 at 9:48 am
[...] está disponível a versão [...]
February 20th, 2010 at 11:09 am
Here’s an HTML version of the raw data table:
jQuery 1.3.2
jQuery 1.4.1
jQuery 1.4.2
Prototype 1.6.1
MooTools 1.2.4
Dojo 1.4.1
YUI 3.0.0
FF 3.5
2182
806
565
2156
1073
575
1885
FF 3.6
1352
677
519
2067
857
750
1494
Opera
983
697
222
793
678
218
1201
Safari
610
435
252
315
235
238
612
Chrome
1591
703
293
271
312
222
745
IE 8
2470
1937
1141
3045
4749
1420
2922
IE 7
4468
3470
1705
9863
10034
1737
5830
IE 6
6517
4468
2110
13499
11453
2202
7295
February 20th, 2010 at 11:15 am
opps:
try http://clove.com/jquery-raw-data-comparison.html
and delete previous comment.
February 20th, 2010 at 1:10 pm
[...] jQuery plait et ne cesse d’évoluer. La version 1.4 est sorti en janvier. Aujourd’hui, une nouvelle mise à jour vient améliorer la fameuse [...]
February 20th, 2010 at 1:17 pm
[...] par Brett le 20-02-2010 jQuery 1.4.2 released (Performance improvements & new features) http://blog.jquery.com/2010/02/19/jquery-142-released/ No [...]
February 20th, 2010 at 1:57 pm
[...] JQUERY 1.4.2 RELEASED [...]
February 20th, 2010 at 2:41 pm
Amazing… I´ll start working on something!
February 20th, 2010 at 6:45 pm
[...] ???http://blog.jquery.com/2010/02/19/jquery-142-released/ 11 Digg ??: ?? ??: jQuery ?????????jQuery????????? (10) ?? (0) Trackbacks (0) ???? Trackback [...]
February 20th, 2010 at 9:42 pm
??????
February 21st, 2010 at 3:14 am
I recently came to know about it, but I did not find a good help file. Help should also be available in pdf or chm format.
February 22nd, 2010 at 12:21 am
[...] jQuery 1.4.2 If you enjoyed this article please consider sharing [...]
February 22nd, 2010 at 3:41 am
[...] jQuery 1.4.2 Released – jQuery gets a further minor release on top of the 1.4 platform bringing a number of bugfixes and some impressive performance improvements giving a 3x improvement over jQuery 1.3.2 [...]
February 22nd, 2010 at 4:30 am
I hope that soon certify plugins, some are good, but some should be optimized…
February 22nd, 2010 at 4:39 am
[...] Plus de détails dans la note de version. [...]
February 22nd, 2010 at 5:42 am
[...] von Slickspeed frei verfügbar sind. Da jQuery in der 1.4er Reihe angeblich massiv die Performance verbessert hat und Dojo nun auch einige Versionen weiter ist, wollte ich wissen wie sich die aktuellen [...]
February 22nd, 2010 at 9:13 am
Firefox 3.6 $(window).unload not work ?
February 22nd, 2010 at 10:10 am
[...] ????? jQuery Minified (24kb Gzipped) jQuery Regular (155kb) ???http://blog.jquery.com/2010/02/19/jquery-142-released/ [...]
February 22nd, 2010 at 10:56 am
[...] Notes, Download und weitere Interessante Infos findet Ihr im jQuery-Blog. « [Fundstück] 30 nützliche Web-Apps 2010-02-22 Tags: keine Kategorie: WebTec [...]
February 22nd, 2010 at 11:47 am
Outstanding. Would be awesome to see a larger historical performance comparison dating back to the early releases of jquery (1, 1.2, 1.3, etc). I know there were similar graphics back then before JQuery had quite this much love.
February 22nd, 2010 at 12:43 pm
Any word on when the vsdoc for Visual Studio will be published?
February 22nd, 2010 at 1:51 pm
[...] The new version of jQuery – 1.4.2 comes with some very good news. Check out the performance improvements here. [...]
February 22nd, 2010 at 2:46 pm
[...] : Blog jQuery Framework, JavaScript, jQuery, MooTools, Prototype Développement web [...]
February 23rd, 2010 at 5:50 am
[...] 1.4.2 is blazing fast http://j.mp/9yUNZ9 has anyone cut a Mobile Safari subset that fits under 25Kb, so that it is cached on [...]
February 23rd, 2010 at 8:52 am
FYI the link to “Tutorials” here on this Web site is throwing a database error:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function “MediaWikiBagOStuff::_doquery”. MySQL returned error “1205: Lock wait timeout exceeded; try restarting transaction (localhost)”.
February 23rd, 2010 at 2:44 pm
I love jQuery! Really easy to use!
February 24th, 2010 at 8:00 am
[...] ??????????? ????? [...]
February 24th, 2010 at 2:25 pm
You guys rock… again!!!
Patrick
February 25th, 2010 at 3:13 am
Very cool, but 155kb isn’t such small anymore, right? OK, there excist an gzipped version, but 155kb is quite big.
February 25th, 2010 at 1:00 pm
jQuery.getScript() does not work! old scripts run and run again when you call this function
February 27th, 2010 at 9:43 am
greatt.. good job. we always need jquery.
February 28th, 2010 at 9:16 am
[...] Die Javascript-Bibliothek ist dabei nochmals deutlich schneller geworden. (siehe auch jQuery Blog, [...]
February 28th, 2010 at 9:34 am
[...] jQuery 1.4.2 release note [...]
March 1st, 2010 at 12:36 pm
Great stuff but need the vsdoc for Visual Studio. Any idea when that will be ready?
Thanks,
James.
March 2nd, 2010 at 11:33 am
jquery floatobject-1.4 breaks my page when I upgrade to 1.4.2, it contains UI accordions (jquery-1.4.2 and jquery-ui-1.8rc3). The following call in floatobject-1.4 breaks;
var offset = this.jqObj.offset();
this.currentX = offset.left;
this.currentY = offset.top;
JavaScript says:
offset is null
if you hardcode 0′s for this.CurrentX and this.currentY, it eliminates any JavaScript errors. I’m not saying that’s a fix or work around, just a clue as to what’s gone wrong.
March 4th, 2010 at 4:39 pm
[...] I totally missed the jQuery 1.4.2 release. Guess I should release a new version of the Grails-jQuery-plugin soon [...]
March 4th, 2010 at 11:21 pm
There has been a great increase in performance.I found delegate() in this release.What is the actual difference between live() and delegate()? Is delegate() having high performance than live()?
March 5th, 2010 at 7:52 am
@Saranya
http://brandonaaron.net/blog/2010/03/4/event-delegation-with-jquery
Take a look at this article by jQuery Core Team Member Brandon Aaron who describes each of the ways you can now do Event Delegation in jQuery which are $.bind(), $.live() and $.delegate().
March 12th, 2010 at 10:27 am
[...] jQuery 1.4.2 Released [...]
March 16th, 2010 at 5:18 am
Where is the visual studio documentation for 1.4.2?
March 25th, 2010 at 4:46 am
From The Philippines
wow! makes developer’s life whole lot easier! thanks to jquery and the brilliant minds behind it.
March 25th, 2010 at 1:54 pm
Great work, great performance increases. Looking forward to the Visual Studio vsdoc file – jquery-1.4.2-vsdoc.js. VS IntelliSense makes working jQuery that much easier.
March 28th, 2010 at 3:49 am
Good framework and all the best to all developers ;)
March 28th, 2010 at 3:12 pm
[...] 1.4.2 (Release Notes) Minified, Uncompressed Documentation: Changelog [...]
March 29th, 2010 at 7:37 pm
All I get is a blank page ????
Im going back to 1.3
March 30th, 2010 at 7:15 am
we’ve tried to use 1.4.2 for our jquery products but cant manage to show transitions correctly in IE7 :(
April 14th, 2010 at 8:09 pm
very good
i love you jquery.
April 26th, 2010 at 2:56 pm
Awesome! I see from the chart you’ve provided that Jquery runs faster on Safari browsers than on Chrome. That’s a helpful piece of information
April 30th, 2010 at 6:29 pm
I cannot download this…is there something different for MAC?
May 1st, 2010 at 7:26 am
JQuery, It makes my job more easy!Thank you!
May 3rd, 2010 at 7:41 pm
wow! good job! jquery love :)
thank you! John Resig brother.
May 5th, 2010 at 4:59 am
[...] the second minor release of jQuery 1.4 was released. According to the jQuery team, it fixes a outstanding amount of bugs from the 1.4 release and landing some nice [...]
May 20th, 2010 at 5:23 pm
Woa. Some awesome performance boosts for chrome. I’m loving it. Thanks.
May 23rd, 2010 at 7:23 pm
why can’t submit the chinese comment?
May 27th, 2010 at 12:24 pm
[...] and works with jQuery 1.4.x+ (work with your older code? let me know in the [...]
June 5th, 2010 at 12:32 am
how to download api
June 9th, 2010 at 9:09 am
I just started learning Jquery and your Tutorials are amazing
thanks.
June 15th, 2010 at 3:19 am
[...] Include the Latest Version of jQuery in WordPress without Duplicates Hello there! If you are new here, you might want to subscribe to the RSS feed for updates on this topic.At the time of this posting, WordPress 2.9.2 uses jQuery 1.3.2 but the latest version is 1.4.2. I wanted to use the latest version because it is supposedly about 3 times as fast as 1.3.2 as reported on the jQuery 1.4.2 release notes. [...]
July 7th, 2010 at 5:41 pm
can I just say, as a self-taught dreamweaver user who is looking for a good picture gallery for my website — yes jquery is the best, but I am absolutely at my wits end trying to work out how to put it into my website…… I am fairly competent at doing the things that are relevant to my needs, and my website is quite nice looking (i think) but I really want to improve my site by adding a good picture viewer and there seems to be NO help out there for someone like me, untrained in HTML code talk…
I realise that I may be laughed out of this forum, and that I am probably in way over my head, but I literally don’t know where to look or what to look for. You have all this code, but there are NO SIMPLE STEP-BY-STEP INSTRUCTIONS – how do I organise the files? where do I put the code? why can’t I make it work? Why do you have to have a PhD to understand what to do? Or is there some secret code of honour amongst you web people that means you don’t want self taught ‘outsiders’ to gain any knowledge and do things for themselves..?
can anyone please please help me?
July 7th, 2010 at 5:45 pm
p.s In case anyone takes pity on me (after my rant) and decides to offer me some advice — I am a mac user, and my website (badly in need of updating) is hand-drawnmaps.co.uk
July 9th, 2010 at 12:52 pm
Sorry about my English, I’m from Belgium.
At this moment I can’t say if it is great or not, i’m learning it.
I see many laguages of this tutorial, but no dutch one. Can anyone write this in Dutch? So I can understand the English details.
Thank you
Patrick
July 13th, 2010 at 2:11 pm
[...] Download JQUERY from http://blog.jquery.com/2010/02/19/jquery-142-released/ in this place there is 2 [...]
July 17th, 2010 at 11:11 am
[...] jQuery Blog. Escrito por MicroLibros @ 20 February 2010 0 Comentarios [...]
August 12th, 2010 at 1:31 am
Fantastic Framework to work which will make the workload less. Nice to see new version with improved performace.
Thank you
Prashanth G
August 19th, 2010 at 1:45 am
good,so for me
August 19th, 2010 at 3:18 am
thansk you me.
August 20th, 2010 at 8:53 pm
[...] Blog post [...]
August 21st, 2010 at 5:57 pm
interesting:) thank you
September 1st, 2010 at 2:45 am
???
September 2nd, 2010 at 2:20 am
thankyou!the jquery is very good!i’m study is now!
September 2nd, 2010 at 8:05 am
wonderful, but waiting .vsdoc !!!
September 2nd, 2010 at 10:54 pm
thanks lot for updated version.
September 13th, 2010 at 5:29 pm
I’m trying to downloads jquerry, to my phone. Its a Samsung with
Jquerry 1.1.having trouble any help?
September 17th, 2010 at 12:52 pm
very good articles for ????? wmz ? ??????
September 29th, 2010 at 12:55 pm
How come there are still no vsdocs?
I mean no rush, it’s been _only_ 7 months.
What a great partnership between MS and you guys.
This tells us so much about how MS cares about JavaScript support in Visual Studio :(
Can anyone recommend an IDE with real support for JavaScript?
Aptana, WebStorm, anything else?
October 9th, 2010 at 9:13 am
[...] jQuery Blog. MeneameBitacorasFacebookTwitter Categorías: Desarrollo Etiquetas: jquery blog [...]
October 28th, 2010 at 4:21 am
good
November 18th, 2010 at 5:21 am
I am Preparing for Google Adword Professional exam.
Is there any practice exam available????.
Please give me details about it
November 20th, 2010 at 2:19 am
Hi People
I got a menu that use jquery 1.3.2 and get problems width this post gadget because of jquery 1.4.2. ¿What can I do? regards
November 29th, 2010 at 1:38 am
If you want to know more about the SECRETS of SEO join with me
November 29th, 2010 at 11:43 pm
Question:
Is there a way to see how the pages that have been indexed are ranked without having to type it in at Google and then start searching ?
December 3rd, 2010 at 9:29 am
What do you think of pop-under exchanges? I’m having trouble getting visitors to my site,
so I’m thinking about trying one. Are they effective?
December 28th, 2010 at 6:06 am
Hi,
I E Browser reports an error warning on line 4618 when I load jquery from the following library.
http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
I need this js for the right functioning of jScrollPane. Please fix this error
Haneefa
Bridge-India
March 11th, 2011 at 3:35 pm
[...] supports jQuery 1.4.2 (Drupal 6 was stuck at 1.2.x). This creates an easier process to install and update modules (like [...]
March 23rd, 2011 at 1:05 am
[...] supports jQuery 1.4.2 (Drupal 6 was stuck at 1.2.x). This creates an easier process to install and update modules (like [...]
August 5th, 2011 at 9:38 am
[...] supports jQuery 1.4.2 (Drupal 6 was stuck at 1.2.x). This creates an easier process to install and update modules (like [...]
September 28th, 2011 at 10:04 pm
[...] for the development version of the example. The production copy uses a later, minified version of jQuery 1.4.2, which is notably faster than [...]
October 6th, 2011 at 1:41 pm
[...] jQuery (A javascript framework that will help use Ajax with simple syntax) [...]