return ret;
}
-
+
// String
var pos = POS.test( selectors ) || typeof selectors !== "string" ?
jQuery( selectors, context || this.context ) :
}
}
- ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
return this.pushStack( ret, "closest", selectors );
},
// Test on disconnected node
equals( jQuery("<div><p></p></div>").find("p").closest("table").length, 0, "Make sure disconnected closest work." );
- // Bug #7369
- equals( jQuery('<div foo="bar"></div>').closest('[foo]').length, 1, "Disconnected nodes with attribute selector" );
- equals( jQuery('<div></div>').closest('[lang]').length, 0, "Disconnected nodes with non-existent attribute selector" );
});
test("closest(Array)", function() {