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 dbec38f..9db0f9d 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; });
        },