Skip to content

Commit

Permalink
Added fix for broken :only-child.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Jun 29, 2007
1 parent 7088b50 commit 7b9d825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selector/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7b9d825

Please sign in to comment.