Added fix for bug #1567 - uppercase nodeName test in .add().
[jquery.git] / src / core.js
index 06d2fd7..1236f1c 100644 (file)
@@ -282,7 +282,7 @@ jQuery.fn = jQuery.prototype = {
                        this.get(),
                        t.constructor == String ?
                                jQuery(t).get() :
-                               t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
+                               t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
                                        t : [t] )
                );
        },
@@ -363,6 +363,10 @@ jQuery.fn = jQuery.prototype = {
                return this.after( val ).remove();
        },
 
+       eq: function(i){
+               return this.slice(i, i+1);
+       },
+
        slice: function() {
                return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
        },