Yes, .andSelf() exists specifically for the case where someone wants .find() to also include the previous selection.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] Erik Beeson wrote: > I believe that's expected behavior. For your second example, I think > you'd want to use filter(...) instead of find(...). > > --Erik > > > On Tue, May 26, 2009 at 5:38 PM, yodza <yodza.fr > <http://yodza.fr>@gmail.com <http://gmail.com>> wrote: > > > Is it the normal behavior of the find() method to search the passed > expression ONLY within child nodes of a wrapped set ? > (which is not explicitly specified in the documentation: > http://docs.jquery.com/Traversing/find#expr) > > <ol> > <li id="one">One</li> > <li id="two">Two</li> > <li id="three">Three</li> > </ol> > > >>> $('ol').find('[id^=t]') // retrieving id="t*" > [li#two, li#three] > >>> $('li').find('[id^=t]') // retrieving id="t*" > [ ] > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
