I have no specific use case in mind for that particular example. I was thinking of the second "closest" argument would act like a break statement rather than a search within context.
Still, If the context is used to limit the traversal of the closest loop, how would you set the context of raw DOM nodes such that $ ( event.target ).closest(".foo"); was still useful? On Jul 23, 1:45 pm, John Resig <jere...@gmail.com> wrote: > > > In what case would you want to find the closest() match but outside of a > > > context? > > > $( this ).closest(".foo"); > > > currently $( this ).context is equal to "this" > > Sorry, you misunderstand me - I meant that with your proposed case: > $(DOMEelement).closest("body", DOMElementContext); returns $("body"); > > You were advocating for the context to be completely outside of the parent > element chain. I was wondering what use case that was implying. > > --John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---