I found myself paying close attention to jquery.
Http://jquery.com/blog/2008/02/08/jquery-123-air-namespacing-and-ui-alpha/
Major changes:
- Compatible with air (Adobe Integrated Runtime (air), [technical advantages of Adobe AIR and Adobe AIR]
- . Data () &. removedata ()
Attaches data to and removes data from an object, $. data (element); // returns a uniqueid $. data (element, 'dataname') or $ (element ). data (dataname); // return value $. data (element, dataname, datavalue) or $ (element ). (dataname, datavalue); // set the value
- . BIND (". namespace"). Unbind (". namespace ")
Jquery1.2 supports namespaced events. Events in a specific namespace can be grouped by multiple event responses.
$ ("Div"). BIND ("click. plugin", function (){});
$ ("Div"). BIND ("Mouseover. plugin", function (){});
$ ("Div"). Unbind (". plugin"); // all handlers removed
- . Trigger ("click !")
. Trigger () is used to trigger an event. It also supports the Event Mode of a specific namespace.
$ ("Div"). BIND ("click", function () {alert ("hello ");});
$ ("Div"). BIND ("click. plugin", function () {alert ("goodbye ");});
$ ("Div"). Trigger ("Click! "); // Alert (" hello ") onlyThere is also a. triggerhandler () method, which is similar to trigger (). However, it only triggers the bound Event Response Function and does not trigger the browser's default response method.
- Alpha release: jquery UI 1.5 and jquery enchant 1.0 [I haven't checked it yet]