Loading...

jquery-dev@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[jquery-dev] Re: Changes to closest (#6507) breaks $(event.target).closest(...) in event handlers John Resig Tue Jul 28 05:30:32 2009

Yeah, it broke other stuff as well, already backed out.

--John


On Tue, Jul 28, 2009 at 7:46 AM, Mark Gibson <[EMAIL PROTECTED]> wrote:

>
> Any event handlers that follow this pattern no longer work:
>
> $('.container').bind('click', function(event) {
>    $(event.target).closest('.clickable').doSomething();
> });
>
> as the context is set to event.target
>
> Demo:
> http://jsbin.com/ataxe
>
> Ticket:
> http://dev.jquery.com/ticket/4986
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---