git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We don't want to filter out the qunit file.
[jquery.git]
/
src
/
data.js
diff --git
a/src/data.js
b/src/data.js
index
085db0b
..
500f7ea
100644
(file)
--- a/
src/data.js
+++ b/
src/data.js
@@
-14,8
+14,8
@@
jQuery.extend({
var id = elem[ expando ], cache = jQuery.cache, thisCache;
\r
\r
// Handle the case where there's no name immediately
\r
var id = elem[ expando ], cache = jQuery.cache, thisCache;
\r
\r
// Handle the case where there's no name immediately
\r
- if ( !name ) {
\r
- return id;
\r
+ if ( !name && !id ) {
\r
+ return null;
\r
}
\r
\r
// Compute a unique ID for the element
\r
}
\r
\r
// Compute a unique ID for the element
\r
@@
-39,7
+39,7
@@
jQuery.extend({
thisCache[ name ] = data;
\r
}
\r
\r
thisCache[ name ] = data;
\r
}
\r
\r
- return name === true ? thisCache : thisCache[ name ];
\r
+ return name ? thisCache[ name ] : thisCache;
\r
},
\r
\r
removeData: function( elem, name ) {
\r
},
\r
\r
removeData: function( elem, name ) {
\r
@@
-116,7
+116,9
@@
jQuery.extend({
\r
jQuery.fn.extend({
\r
data: function( key, value ){
\r
\r
jQuery.fn.extend({
\r
data: function( key, value ){
\r
- if(typeof key === "undefined" && this.length) return jQuery.data(this[0], true);
\r
+ if ( typeof key === "undefined" && this.length ) {
\r
+ return jQuery.data( this[0] );
\r
+ }
\r
\r
var parts = key.split(".");
\r
parts[1] = parts[1] ? "." + parts[1] : "";
\r
\r
var parts = key.split(".");
\r
parts[1] = parts[1] ? "." + parts[1] : "";
\r
@@
-165,4
+167,4
@@
jQuery.fn.extend({
clearQueue: function(type){
\r
return this.queue( type || "fx", [] );
\r
}
\r
clearQueue: function(type){
\r
return this.queue( type || "fx", [] );
\r
}
\r
-});
\ No newline at end of file
+});
\r