jQuery 1.2.3: AIR, Namespacing, and UI Alpha

Posted on by

We’re happy to announce a brand new release of jQuery. This is primarily a bug fix release for jQuery 1.2. You can view the full list of what was fixed on the bug tracker.

Downloading

jQuery 1.2.3:

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.3

Important Changes

The primary purpose of this release was to fix a couple outstanding bugs from the jQuery 1.2.2 release. Specifically, this release is now compatible with Adobe AIR, will be included in Drupal 6, and will be the base for jQuery UI 1.5. Additionally, a couple minor features, for plugin developers, were included in this release.

.data() and .removeData()

These methods complement the, already included, jQuery.data and jQuery.removeData methods introduced in jQuery 1.2. The important change, however, is that they’ve been tailored for plugin developers. You can now namespace data additions – like you can with event binding/unbinding. For example:

  $("div").data("test", "original");
  $("div").data("test.plugin", "new data");
  alert( $("div").data("test") == "original" ); // true
  alert( $("div").data("test.plugin") == "new data" ); // true

Additionally, getting or setting data values can be overridden by a plugin. For example, the following code is from the, recently updated, draggables in jQuery UI:

  $(element).bind("setData.draggable", function(event, key, value){
     self.options[key] = value;
  }).bind("getData.draggable", function(event, key){
     return self.options[key];
  });

The above makes it such that all attempts to get and set draggable-namespaced data will be intercepted and handled by the plugin directly (rather than being bound directly to the element). The result is a powerful new interface for dealing with internalized data within a plugin.

.unbind(“.namespace”)

In jQuery 1.2 you could add and remove namespaced events, however you always had to include a name for the type of event being used. With this addition you can now remove all bound events that match a particular namespace, for example:

  $("div").bind("click.plugin", function(){});
  $("div").bind("mouseover.plugin", function(){});
  $("div").unbind(".plugin"); // All handlers removed

The above removes all bound event handlers that are within the “plugin” namespace.

.trigger(“click!”)

Finally, a new addition was included to allow exclusion of namespaced events from being triggered. For example:

  $("div").bind("click", function(){ alert("hello"); });
  $("div").bind("click.plugin", function(){ alert("goodbye"); });
  $("div").trigger("click!"); // alert("hello") only

The above only triggers the non-namespaced event handlers.

Alpha Release: jQuery UI 1.5 and jQuery Enchant 1.0

Last, but not least, we’re pleased to announce a new alpha release of jQuery UI. This is an overhaul of the existing code base with tons of a bug fixes and API tweaks. We need a ton of help testing this alpha, making sure that it’ll be rock-solid for the upcoming release candidate. Please participate in the discussion, helping us to get ready.

Additionally, we’re working on a new plugin called jQuery Enchant which will bring a ton of advanced effects to the library (like clip, shake, and explode – to name a few). This is an alpha release of this plugin, as well – so please help us test it and make sure that it’s completely up to the jQuery level of quality.

Download

Demos

Enjoy!

24 thoughts on “jQuery 1.2.3: AIR, Namespacing, and UI Alpha

  1. Thanks for all the great work guys. I’ve been using jQuery since alpha, before it even had a version number and have never looked back. It has enabled us to produce significantly more functional and higher quality web apps in fields including health care, industrial maintenance, and business systems. I look forward to moving our non-ui based conglomeration of plugins to the new jQuery UI library. Peace. Isaac.

  2. Pingback: Nawak, Le blog avec des Chinois dedans » jQuery 1.2.3 on AIR

  3. Thanks, upgrading it in wee later today.
    I look very much forward the new jQuery UI, the previous one had a few bugs in the official release that I need to be fixed for a few projects.

  4. giGGler on said:

    congrats for this improvements on the platform.

    IMHO Enchant has nothing new (except transfer or contentScale) compared to other libs.

  5. Any speed improvements? But anyway, thank you for nice piece of good work. Good to see UI in alpha. Previous version was working like alpha.

  6. Pingback: Ajaxian » jQuery 1.2.3: Support for AIR, Namespacing

  7. sebastian on said:

    is great to see how u ppl work so hard to make easy our life like web designers :)

    congratulations.

  8. It appears there is a bug in your example code for the draggables:

    the return self.options[key; should be return self.options[key];

  9. Pingback: Javascript News » Blog Archive » jQuery 1.2.3: Support for AIR, Namespacing

  10. Pingback: PHP Blogger: jQuery Update - Ein PHP Blog auf deutsch

  11. Pingback: Seraphinux - Serial Experiments on The Wired » Blog Archive » jQuery con soporte para Adobe AIR

  12. I am bummed that the “handy shortcut” in grep and map of being able to pass a string, rather than a function, is removed. Was this intentional (a speed improvement, maybe)?

  13. Pingback: jQuery 1.2.3: AIR, Namespacing, and UI Alpha | Development Feeds

  14. Pingback: jQuery UI 1.5 alpha | rdworth.org

  15. John Farrar on said:

    OK, will we be seeing some work done on jQuery plug-in (updates) for DreamWeaver, Aptana and the like?

  16. Pingback: Jon Chase’s Blog » jQuery - THE JavaScript library to use?

  17. Pingback: Giga Promoters Blog » Killer Applications with CakePHP, JQuery and Adobe Air

  18. Pingback: Giga Promoters Blog » Blog Archive » Killer Applications with CakePHP, JQuery and Adobe Air

  19. Pingback: jQuery: » jQuery UI Worldwide Sprint: March 14-15

  20. Please could we have more tutorials on how to use .bind because I am unclear on how to exactly use it.

    Say for example I want to include a HTML file into the DOM and then use this within my JQuery call (say allowing me to use every mouse click on every form button), but I don’t know how to do this.

    Please have MORE tutorials on binding of HTML files loaded into DOM.

    Thanks