jQuery 1.2.6: Events 100% faster
jQuery 1.2.6 is primarily a bug fix release for jQuery 1.2. You can view the full list of what was fixed on the bug tracker.
This is the next release immediately following jQuery 1.2.3. Releases 1.2.4 and 1.2.5 were skipped (1.2.4 was built incorrectly, rendering it effectively identical to 1.2.3, and 1.2.5 was missing a patch).
The entire jQuery team did a fantastic job in pulling this release together – I want to take this opportunity to thank them all for their continued hard work.
I’d also like to take this opportunity to welcome Ariel Flesler to the core jQuery development team. He provided valuable help in pulling this release together – contributing bug fixes, performance improvements, features, and test cases. You can see the result of his hard work all throughout this release. Welcome Ariel and thank him for all his contributions!
Downloading
jQuery 1.2.6:
- Recommended Hosted Code with Google: AJAX Libraries API
- jQuery Minified (15kb with Gzipping)
- jQuery Packed (30kb)
- jQuery Regular (100kb)
If you wish to checkout the full release from the Subversion repository, you can do so by following the instructions and checking out the source from the following location:
svn co http://jqueryjs.googlecode.com/svn/tags/1.2.6
Performance Improvements
Once again the jQuery team has worked hard to bring huge performance improvements in this release. As with previous releases we’ve expanded to look at many areas of the jQuery framework, looking for common pain points, and providing relief.
All data and test cases for the below performance improvements can be found in the the following jQuery 1.2.3 v. 1.2.6 Google Spreadsheet (results for Internet Explorer 6 were excluded in favor of Internet Explorer 7 due to their virtually-identical results).
Event Handling is 103% Faster
In analyzing intense application code (specifically operations such as drag-and-drop) we looked for ways in which universal changes could be made that would affect all users. A frequently-called piece of code was that of the jQuery event handler, any optimizations to it would dramatically improve the performance of all resulting frequently-called events. By focusing improvements here all frequently-called events that you have should see immediate benefits.
CSS Selectors are 13% faster
A number of optimizations have been made to internal jQuery methods, dramatically improving their performance, while providing measurable benefit to some of the most commonly used code in jQuery (such as the CSS Selector code).
For example the jQuery.map() method is now 866% faster and jQuery.extend() is 19% faster. These two changes have allowed for dramatic improvements in performance all throughout the library.
.offset() is 21% faster
Together with the improvements to jQuery’s event handling code optimizations of .offset() have allowed intense mouse-based operations to become much faster. For example jQuery UI’s drag-and-drop code is now over 300% faster because of these change (allowing you to achieve faster, smoother, drag-and-drop operations).
.css() is 25% faster
A method that’s frequently called (both internally and externally). The optimizations to this method are easily felt in others (like .offset(), for example).
New Features and Major Changes
Dimensions Plugin is Now Part of Core
The remaining methods of the Dimensions plugin, by Brandon Aaron, have been introduced into jQuery core, along with additional bug fixes and performance improvements. This plugin has seen considerable use amongst developers and plugin authors and has become a solid part of the jQuery ecosystem. We’ve been, slowly, introducing the most-used methods from the Dimensions plugin over the past couple releases – but with the release of 1.2.6 all remaining methods are now part of core.
If you’re upgrading your copy of jQuery to version 1.2.6 you can now opt to exclude the Dimensions plugin from your code.
The full documentation for Dimensions can be found on the jQuery documentation site (and is in the process of becoming integrated with the core jQuery documentation).
.attr() overhaul
The .attr() method has been completely overhauled (resolving about 15 outstanding bugs). Additionally, the method has been significantly simplified and optimized.
.toggle() can now accept more functions
Historically jQuery’s .toggle() function has accepted two functions (to be toggled in an even/odd manner). However that has been changed so that any number of functions can be provided and toggled by a mouse click.
$("div").toggle(function(){ $(this).removeClass("three").addClass("one"); }, function(){ $(this).removeClass("one").addClass("two"); }, function(){ $(this).removeClass("two").addClass("three"); });
You can now unbind bound .toggle() and .one() functions
function test(){ $(this).addClass("test"); } $("div").one("click", test); $("div").unbind("click", test); $("div").toggle(test, test); $("div").unbind("click", test);
.index() supports jQuery collections
jQuery’s .index() function has allowed you to find the location of a DOM element in the jQuery collection – now you can also specify a jQuery collection (the first element of which will be extracted and located in the original set).
var test = $("div.test"); $("div").index( test ) == 3
jQuery.makeArray can convert ANYTHING to an array.
jQuery’s internal .makeArray() method now converts any array-like object into a new array. Additionally it wraps all other objects as an array and returns the resulting set.
jQuery.makeArray( document.getElementsByTagName("div") ) // => [ div, div, div ] jQuery.makeArray( true ) // => [ true ] jQuery.makeArray() // => []
beforeSend can cancel Ajax calls
The beforeSend Ajax callback has allowed developers to execute a piece of code prior to a request occurring – now that code can also verify the integrity of some parameters and cancel the resulting Ajax request (useful for tasks like form validation).
$.ajax({ beforeSend: function(){ return $("#input").val() == ""; }, url: "test.php" });
Exposed Speeds
jQuery has a number of named animation speeds (such as ‘slow’, ‘fast’, and ‘default’) you can now provide your own names for animation speeds, or modify the existing ones, by manipulating the jQuery.fx.speeds object.
jQuery.fx.speeds.slow = 1000; $("#test").slideDown("slow");
I’m intrigued by your way of measuring improvements.
In my book 103% improvement in timing means that something finishes before you ask it to start.
I assume your calculation involves taking the “after” time and dividing it into the “before” time then subtracting 100%.
Congrats to the best jQuery ever…
Is it possible to update the jQuery documentation in the next couple of weeks?
It’s because I (and many more .NET programmers) use the doc’s for creating a header file for Visual Studio 2008 Intellisense. (see http://www.infobasis.com/sandpit/jQuery-Intellisense – InfoBasis JQuery IntelliSense Header Generator).
Pingback: AJAX Frameworks Update |
hi i want to learn more about latest java scripts and how easily that implements and interacts with asp.net 2005
send me some examples
for making efective and faster my web applications.
i m currentely as a programmer in krish compu soft pvt. ltd
Pingback: » WordPress 2.6 Beta 1 boren.nu
Pingback: Download now - Wordpress 2.6 is out now for Beta 1
Pingback: WordPress 2.6 Beta 1-TurkForum.Net
Pingback: Wordpress versi 2.6 beta 1 sudah rilis | KopiOnline.com
Pingback: ã‚ーã©ã·ã‚Œã™ã£ï¼ » WordPress 2.6 ベータ 1
Pingback: WordPress 2.6 Beta 1
Pingback: WordPress 2.6 Beta 1 | protusi
Pingback: WordPress 2.6 Beta 1 | FlishFun.com
Pingback: WordPress 2.6 Beta 1 | Tadd Mencer
Pingback: WordPress 2.6 Beta 1 - pestaola.gr blog
Pingback: Wordpress 2.6 bata1版本 新功能详解 | å¸•å…°æ˜ åƒ
Pingback: WordPress 2.6 Beta 1 erschienen | Caschys Blog
Pingback: iTechnologize » WordPress 2.6 Beta 1
Pingback: Bitácora de Gesbit
Pingback: BlogTuga | Wordpress 2.6 Beta 1
Pingback: Wordpress 2.6 New Under The Hood Features - ShoeMoney®
Pingback: Wordpress 2.6 Beta 1 | WordPress-PT
Pingback: WordPress 2.6 Right Around The Corner | Jeffro2pt0
Pingback: Релиз Wordpress 2.6 beta1 | ВебмаÑтеру поÑвÑщаетÑÑ...
Pingback: Download bản WordPress 2.6 Beta 1 | Việt Tutorial [Viettut.info]
Pingback: WordPress 2.6 Beta 1 at WordPress 2.6 Beta 1
Pingback: 空想枫 - WordPress 2.6 Beta 1å‘布
Pingback: Вышел релиз Wordpress 2.6 Beta 1 | SocialTrend
Pingback: Gabfire web design » The steps of WordPress 2.6
Pingback: Wordpress 2.6 com grandes melhorias | Wordpress Love - Themes, Plugins e tudo para Wordpress, em Português
Pingback: WordPress 2.6 Beta 1 | Open Mania
Pingback: WordPress 2.6 le ultime novità » Archivi Blog » WordPress Italy
Pingback: WordPress 2.6 Adds All the Extra Goodies | Green Mountain Geek
Pingback: Dicas Weblogs » WordPress 2.6 - O que tem de bom?
Pingback: MoehBlog.de> » Neuerungen in WordPress 2.6 - Zu oft was Neues
Pingback: WordPress最新版本 | 狂舞网络
Pingback: Чем же хорош WP 2.6? ТеÑтируем beta 1 | InGeekLog: Блоггинг как Ñтиль жизни
Pingback: Wordpress keeps going, WP 2.6 is well on it’s way | nomad-one consulting
Pingback: Wordpress 2.6, chi lo aspetta con me? | Cabrino Simone’s Blog
http://pitfalls.wordpress.com/2008/07/07/querying-it-jquery-way-getelementsbyclass/
Really impressed with your efforts and the big community you having with jquery. no doubt jquery is the best. i am using prototype and i am a big fan of it but still i am having very good experience with jquery too.
Pingback: ocean90’s weblog » Wordpress 2.6 RC1 erschienen
Pingback: Релиз WordPress 2.6 - что нового ? | Analyse|that
Pingback: WordPress Tweaks » Blog Archive » WordPress 2.6 Beta 1
Pingback: Softonix.com » Blog Archive » WordPress 2.6 Beta 1
Hi,
How to have automatic menu expand in jquery: “1.2.6”
Pingback: Wir fahren mit Wordpress 2.6 | Promoter Blog
Pingback: FunBlog :: Grab The WordPress 2.6 Final Version Now! :: August :: 2008
Pingback: PHP Blogger: +++ Updates +++ Updates +++ - Ein PHP Blog auf deutsch
Recently go on the Internet TV channels I stumbled upon on this and am happy to provide it to you. I was surprised, but the channel was obsolyutno free 24 / 7. Watch and enjoy.
Look TV Video
Really impressed with your efforts and the big community you having with jquery. no doubt jquery is the best. i am using prototype and i am a big fan of it but still i am having very good experience with jquery too.