mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Use the getText utility function provided by Sizzle.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user