- return data === undefined && parts[1] ?\r
- this.data( parts[0] ) :\r
- data;\r
- } else\r
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){\r
- jQuery.data( this, key, value );\r
- });\r
- },\r
-\r
- removeData: function( key ){\r
- return this.each(function(){\r
- jQuery.removeData( this, key );\r
- });\r
- },\r
- queue: function(type, data){\r
- if ( typeof type !== "string" ) {\r
- data = type;\r
- type = "fx";\r
- }\r
-\r
- if ( data === undefined )\r
- return jQuery.queue( this[0], type );\r
-\r
- return this.each(function(){\r
- var queue = jQuery.queue( this, type, data );\r
- \r
- if( type == "fx" && queue.length == 1 )\r
- queue[0].call(this);\r
- });\r
- },\r
- dequeue: function(type){\r
- return this.each(function(){\r
- jQuery.dequeue( this, type );\r
- });\r
- }\r
-});\r
-var expando = "jQuery" + now(), uuid = 0, windowData = {};\r
-\r
-jQuery.extend({\r
- cache: {},\r
-\r
- data: function( elem, name, data ) {\r
- elem = elem == window ?\r
- windowData :\r
- elem;\r
-\r
- var id = elem[ expando ];\r
-\r
- // Compute a unique ID for the element\r
- if ( !id )\r
- id = elem[ expando ] = ++uuid;\r
-\r
- // Only generate the data cache if we're\r
- // trying to access or manipulate it\r
- if ( name && !jQuery.cache[ id ] )\r
- jQuery.cache[ id ] = {};\r
-\r
- // Prevent overriding the named cache with undefined values\r
- if ( data !== undefined )\r
- jQuery.cache[ id ][ name ] = data;\r
-\r
- // Return the named cache data, or the ID for the element\r
- return name ?\r
- jQuery.cache[ id ][ name ] :\r
- id;\r