• DB function failed with error number 1194
    Table 'jos_session' is marked as crashed and should be repaired SQL=SELECT guest, usertype, client_id FROM jos_session WHERE client_id = 0
jQuery 1.2.3: AIR, Namespacing, and UI Alpha... :D

jQuery team announced availability of jQuery 1.2.3 version.

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.


jQuery 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, 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.


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.


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.



Jomwitter Twitter Badge

Who's Online