Commit 7b9d8258 authored by John Resig's avatar John Resig

Added fix for broken :only-child.

parent 7088b509
...@@ -16,7 +16,7 @@ jQuery.extend({ ...@@ -16,7 +16,7 @@ jQuery.extend({
// Child Checks // Child Checks
"first-child": "a.parentNode.getElementsByTagName('*')[0]==a", "first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==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 Checks
parent: "a.firstChild", parent: "a.firstChild",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment