I have an xpath selector. How can I get the elements matching that selector using jQuery?
I've seen https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript but it doesn't use jQuery, and it seems a little too verbose, and I suppose it's not cross-browser.
Also, this http://jsfiddle.net/CJRmk/ doesn't seem to work.
If you are debugging or similar - In chrome developer tools, you can simply use
$x('/html/.//div[@id="text"]')