I suppose you will need an "return false;" too at the end of the  
handler...

--Robert

On 6. stu. 2009., at 05:29, John Resig <[email protected]> wrote:

> If you want to limit, just do this (using the nightlies):
>
> $("#someRootTable").click(function(e){
>  $(e.target).closest("td.foo", this).each(function(){
>     // Your code goes here.
>  });
> });
>
> Still pretty simple and requires no additional functionality. I may
> just write this up as an example and add it to the live and closest
> docs.
>
> --John
>
>
>
> On Fri, Nov 6, 2009 at 5:22 AM, Robert Katić <[email protected] 
> > wrote:
>> $("#someRootTable").delegate("td.foo", "click", function(e){
>>    // Your code goes here.
>> });
>> Would be easer and safer because the event will be handlet only by  
>> "td.foo"
>> elements inside "#someRootTable".
>>
>> --Robert
>> On 6. stu. 2009., at 04:56, John Resig <[email protected]> wrote:
>>
>> $("#someRootTable").click(function(e){
>>  $(e.target).closest("td.foo").each(function(){
>>    // Your code goes here.
>>  });
>> });
>>
>> --
>>
>> 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.
>>
>
> --
>
> 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 
> .
>
>

--

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.


Reply via email to