X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=a8cb484bbd8e667e338d47fc37c5a45dd36931c3;hb=3f7fc25494988ee5be66c0af0d552b24f0ca1b79;hp=91031113028d9159bf249a260fc0c2df6165ff86;hpb=209278915592fc63bd62039e246046d446d329e0;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 9103111..a8cb484 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -36,20 +36,7 @@ jQuery.fn.extend({ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); } - var ret = ""; - - jQuery.each( this, function() { - // Get the text from text nodes and CDATA nodes - if ( this.nodeType === 3 || this.nodeType === 4 ) { - ret += this.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( this.nodeType !== 8 ) { - ret += jQuery.fn.text.call( this.childNodes ); - } - }); - - return ret; + return jQuery.getText( this ); }, wrapAll: function( html ) {