From: John Resig <jeresig@gmail.com>
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-Url: http://git.asbjorn.biz/?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 dbec38f..9db0f9d 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; });
 	},