I'm interested to know how to extend the selector syntax to accept things like axis definitions etc. (I know from the forum that we should be using the .parents() methods etc but I'd like to extend the selector syntax myself.)
While the .parent() and .children() methods etc work very well when combined with the excellent XPath-style selector support, I'm finding many situations where axis selectors such as ancestor:: and ancestor-or-self:: etc (or a shorthand) would be very useful in the selector expression itself as an alternative. (Note: The "//" syntax is already a good way to do some descendent:: like functionality.) I'm gradually building up a simple 'selectors' plugin to add selectors that are not in the core. Another kind member has already explained how to add to the :expr selectors so I have already developed :focus and :hover, with more on their way (such as those in the docs pages that are not actually in the current jquery release). Please note that I'm not trying to restart this debate, I'm just after info on the best way to provide axis filters in the expression strings. Adding to the :expr is easy enough because they just need to return true or false. I just can't figure out how to enable axis:: selectors. Many thanks, George Adamson -- View this message in context: http://www.nabble.com/XPath-Axes%3A-ancestor%28-or-self%29---parents---descendent---children-tf2331493.html#a6486088 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/