]> source.dussan.org Git - jquery.git/commitdiff
Fixed bug with .text(), it only returned the text for the first element.
authorJohn Resig <jeresig@gmail.com>
Thu, 11 Jan 2007 04:52:41 +0000 (04:52 +0000)
committerJohn Resig <jeresig@gmail.com>
Thu, 11 Jan 2007 04:52:41 +0000 (04:52 +0000)
src/jquery/jquery.js

index dbec38f5458eb318400e2a261454f287e787766b..9db0f9d5f5f280be42709d806d12d9e29a639599 100644 (file)
@@ -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; });
        },