$("#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.