Hi Jack, One way you could do it is to use the .andSelf() method:
$(context).find('selector').andSelf(); http://docs.jquery.com/Traversing/andSelf --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 30, 2009, at 5:10 PM, Jack Bates wrote: > > i wish there were a convenient way to apply a selector to an element > and its descendants > > the following works, except that it excludes the context element, > whether it matches the selector or not, > > $('selector', context) > > the following applies the selector to the context element and its > descendants, but additionally applies it to the context element's > siblings and their descendants, > > $('selector', context.parentNode) > > may i file a ticket, for applying the selector to the context element, > as well as its descendants? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---