jQuery

jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT License. jQuery’s syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications.

When you want to display code, you’re probably working with pre elements. The fact that they can contain markup make them really effective for syntax highlighting. I’ve used Knockout en comment binding to generate code into a pre field and that’s really cool.

While working with the Chrome Developer Tool, I’ve discovered that you can retrieve the XPath of a selected node. But… it only works in Chrome. So what about other browsers? What about jQuery? What about querying documents that resulted from an AJAX request?