aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-12-06 17:47:41 -0800
committerJohn Resig <jeresig@gmail.com>2009-12-06 17:47:41 -0800
commit3f7fc25494988ee5be66c0af0d552b24f0ca1b79 (patch)
tree51b0efc88a5da29d27134cf29743a4a6e0f1580a /src/manipulation.js
parent209278915592fc63bd62039e246046d446d329e0 (diff)
downloadjquery-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.js15
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 ) {