February 7th, 2008: This is 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:
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
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.
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.