From: John Resig Date: Thu, 11 Jan 2007 04:52:41 +0000 (+0000) Subject: Fixed bug with .text(), it only returned the text for the first element. X-Git-Tag: 1.1b~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9449591eef44360b5bfdb9a23cea1f4a1a6f3c33;p=jquery.git Fixed bug with .text(), it only returned the text for the first element. --- diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index dbec38f54..9db0f9d5f 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -548,7 +548,7 @@ jQuery.fn = jQuery.prototype = { "textContent" : "innerText"; return e == undefined ? - this.length && this[0][ type ] : + jQuery.map(this, function(a){ return a[ type ]; }).join('') : this.each(function(){ this[ type ] = e; }); },