Skip to content
Permalink
Browse files
Added fix for broken :only-child.
  • Loading branch information
jeresig committed Jun 29, 2007
1 parent 7088b50 commit 7b9d8258909a626f3f380c763ed81150570bbad5
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/selector/selector.js
@@ -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",

0 comments on commit 7b9d825

Please sign in to comment.