[jQuery] Translating XPath expressions to CSS selectors

2008-02-07 Thread tim
> The CSS 3 :root selector is not supported unfortunately, but the root > node of a document is represented by document.documentElement. > > So you could try: > > $('> KNOWN_NODE', document.documentElement) > > or > > $(document.documentElement.tagName + ' > KNOWN_NODE') > > Does that work? Yes i

[jQuery] Translating XPath expressions to CSS selectors

2008-02-06 Thread tim
Hi, I'm trying to migrate from jQuery 1.1.3 to 1.2.2, and I'm having trouble converting my XPath expressions. In CSS, asterisks are "deep", i.e. they match all elements that are descendants of the context node. In XPath, they are not, i.e. they match only the elements that are _direct_ descenda