diff options
author | John Resig <jeresig@gmail.com> | 2009-12-06 17:47:41 -0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-12-06 17:47:41 -0800 |
commit | 3f7fc25494988ee5be66c0af0d552b24f0ca1b79 (patch) | |
tree | 51b0efc88a5da29d27134cf29743a4a6e0f1580a /src/manipulation.js | |
parent | 209278915592fc63bd62039e246046d446d329e0 (diff) | |
download | jquery-3f7fc25494988ee5be66c0af0d552b24f0ca1b79.tar.gz jquery-3f7fc25494988ee5be66c0af0d552b24f0ca1b79.zip |
Use the getText utility function provided by Sizzle.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 910311130..a8cb484bb 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 ) { |