Added fix for broken :only-child.

This commit is contained in:
John Resig 2007-06-29 21:03:27 +00:00
parent 7088b509cf
commit 7b9d825890

View file

@ -16,7 +16,7 @@ jQuery.extend({
// Child Checks
"first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
"only-child": "a.parentNode.getElementsByTagName('*').length==1",
"only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
// Parent Checks
parent: "a.firstChild",