text
text: function( text ) {
// <summary>
// Set the text contents of all matched elements.
// Similar to html(), but escapes HTML (replace "<" and ">" with their
// HTML entities).
// Part of DOM/Attributes
// </summary>
// <returns type="String" />
// <param name="text" type="String">
// The text value to set the contents of the element to.
// </param>
if ( typeof text !== "object" && text != null )
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
var ret = "";
jQuery.each( text || this, function(){
jQuery.each( this.childNodes, function(){
if ( this.nodeType != 8 )
ret += this.nodeType != 1 ?
this.nodeValue :
jQuery.fn.text( [ this ] );
});
});
return ret;
},