Fixed issue with comment text being included in .text() results.
[jquery.git] / src / jquery / jquery.js
index 0a21af7..fc3d551 100644 (file)
@@ -378,8 +378,9 @@ jQuery.fn = jQuery.prototype = {
                for ( var j = 0; j < e.length; j++ ) {
                        var r = e[j].childNodes;
                        for ( var i = 0; i < r.length; i++ )
-                               t += r[i].nodeType != 1 ?
-                                       r[i].nodeValue : jQuery.fn.text([ r[i] ]);
+                               if ( r[i].nodeType != 8 )
+                                       t += r[i].nodeType != 1 ?
+                                               r[i].nodeValue : jQuery.fn.text([ r[i] ]);
                }
                return t;
        },
@@ -1025,6 +1026,7 @@ jQuery.extend({
                        odd: "i%2",
                        
                        // Child Checks
+                       "nth-child": "jQuery.sibling(a,m[3]).cur",
                        "first-child": "jQuery.sibling(a,0).cur",
                        "last-child": "jQuery.sibling(a,0).last",
                        "only-child": "jQuery.sibling(a).length==1",
@@ -1265,7 +1267,8 @@ jQuery.extend({
                        "class": "className",
                        "float": "cssFloat",
                        innerHTML: "innerHTML",
-                       className: "className"
+                       className: "className",
+                       value: "value"
                };
 
                if ( fix[name] ) {
@@ -2549,7 +2552,7 @@ jQuery.macros = {
                 * @cat DOM/Manipulation
                 */
                remove: function(a){
-                       if ( !a || jQuery.filter( [this], a ).r )
+                       if ( !a || jQuery.filter( a, [this] ).r )
                                this.parentNode.removeChild( this );
                },