aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core.js b/src/core.js
index 098d4bd39..f36edefa3 100644
--- a/src/core.js
+++ b/src/core.js
@@ -477,6 +477,26 @@ jQuery.fn = jQuery.prototype = {
andSelf: function() {
return this.add( this.prevObject );
},
+
+ data: function( key, value ){
+ if ( value == null ) {
+ if ( this.length ) {
+ var data = jQuery.data( this[0], key );
+ return data == null ?
+ jQuery.data( this[0], key.split(".")[0] ) :
+ data;
+ }
+ } else
+ return this.trigger("set-" + key + "!", [value]).each(function(){
+ jQuery.data( this, key, value );
+ });
+ },
+
+ removeData: function( key ){
+ return this.each(function(){
+ jQuery.removeData( this, key );
+ });
+ },
domManip: function( args, table, reverse, callback ) {
var clone = this.length > 1, elems;