diff options
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 930b3d9b9..baab8c6c0 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -32,6 +32,12 @@ if ( !jQuery.support.htmlSerialize ) { jQuery.fn.extend({ text: function( text ) { + if(jQuery.isFunction(text)) { + return this.each(function() { + return jQuery(this).text( text.call(this) ); + }); + } + if ( typeof text !== "object" && text !== undefined ) { return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); } @@ -87,7 +93,7 @@ jQuery.fn.extend({ } }).end(); }, - + append: function() { return this.domManip(arguments, true, function(elem){ if ( this.nodeType === 1 ) { |