jQuery.fn.extend({
text: function( text ) {
- if(jQuery.isFunction(text)) {
- return this.each(function() {
- return jQuery(this).text( text.call(this) );
- });
- }
+ 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 ) );