FYI... There is an open enhancement ticket that proposes adding an optional selector to the .andSelf() method. http://dev.jquery.com/ticket/4446 -- Brandon Aaron
On Mon, May 4, 2009 at 5:11 PM, Pappy <helga...@gmail.com> wrote: > > Just curious... what's the jQuery-way of saying "Give me all children > that match a filter and include myself if I happen to match as well."? > > I've been using - > > element.find("*").andSelf().filter([myfilter]) > > but that seems kludgy. Is there a better way? If not, I'll just wrap > this as "findInclusive" or "find([filter], true)" or something.