X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=1fe82fa27ebe86b9addc06cfbc36d72ad0fe8a0a;hb=1d8f7f790d65d5aa1720789964e603382ece26c9;hp=7d7038ee24fcde11b15805ca964d8a673a46b101;hpb=628e1564c48f2b4d18ed5af89ebed88b09d972d4;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 7d7038e..1fe82fa 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -17,6 +17,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, tr: [ 2, "", "
" ], td: [ 3, "", "
" ], col: [ 2, "", "
" ], + area: [ 1, "", "" ], _default: [ 0, "", "" ] }; @@ -35,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 ) { @@ -475,7 +463,7 @@ jQuery.extend({ function cleanData( elems ) { for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) { - if ( (id = elem[expando]) ) { + if ( !jQuery.noData[elem.nodeName.toLowerCase()] && (id = elem[expando]) ) { delete jQuery.cache[ id ]; } }