There is a moreSelectors plugin. Use it as an example of how to extend. http://dev.jquery.com/wiki/Plugins/MoreSelectors
Glen On 6/20/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
Hi folks, Is it possible to add custom selectors to jQuery via a plugin? I'd basically just need to rewrite the selector string before it get's handled by jQuery itself. The reason I ask is because I'm currently converting some OOPish code into jQuery plugins which is tons of fun and I'd like to use selectors like this: -------------------------------------------------------------------------------- $('#tasklist task:3') .task('field', 'name', 'New task name') .task('save'); -------------------------------------------------------------------------------- instead of -------------------------------------------------------------------------------- $('#tasklist tr[td]:nth-child(3)') .task('field', 'name', 'New Task name') .task('save'); -------------------------------------------------------------------------------- Thanks a lot -- Felix -------------------------- My latest blog posts: [image: ThinkingPHP and beyond]<http://feeds.feedburner.com/%7Er/thinkingphp/%7E6/1> My Business: http://www.fg-webdesign.de