From 9449591eef44360b5bfdb9a23cea1f4a1a6f3c33 Mon Sep 17 00:00:00 2001 From: John Resig Date: Thu, 11 Jan 2007 04:52:41 +0000 Subject: [PATCH] Fixed bug with .text(), it only returned the text for the first element. --- src/jquery/jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }); }, -- 2.39.5