I am using jQuery 1.8.0 as part of a WordPress plugin and storing mouse click x/y coordinates and keeping the node information including the parent path information (similar to Getting a jQuery selector for an element).
After some experimentation I noticed that jQuery could not read some of the selectors I had stored. Some examples:
html#:eq(0)
-> the '#' is not necessary but jQuery evaluates it with or without the '#'!
body#:eq(0)
-> jQuery cannot evaluate this, it aborts/stops at this line (different behavior to html tag)
div#:eq(1)
-> jQuery evaluates this (should abort?)
div:eq(1)
-> jQuery aborts/stops at this line (should work?)
Is this a bug (if it is I will report it to jQuery)? My understanding from comments made to this question is that the '#' should be present if and only if there is an id for the element but this does not seem to be how jQuery is behaving.