aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-06-29 21:03:27 +0000
committerJohn Resig <jeresig@gmail.com>2007-06-29 21:03:27 +0000
commit7b9d8258909a626f3f380c763ed81150570bbad5 (patch)
treeaae20f48ff46b45f3b5c63e93966a19277b1b765 /src
parent7088b509cf1acad11d2884d95a83badeb15d1e52 (diff)
downloadjquery-7b9d8258909a626f3f380c763ed81150570bbad5.tar.gz
jquery-7b9d8258909a626f3f380c763ed81150570bbad5.zip
Added fix for broken :only-child.
Diffstat (limited to 'src')
-rw-r--r--src/selector/selector.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selector/selector.js b/src/selector/selector.js
index 13fd09428..e6d2d0697 100644
--- a/src/selector/selector.js
+++ b/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",