$('td').click(function() {
context = $(this).parents('table')[0];
var cells = $('td.a', context);
})
Maurício
-Mensagem Original-
De: Brad
Para: jQuery (English)
Enviada em: segunda-feira, 13 de julho de 2009 16:39
Assunto: [jQuery] table cells selector question
I c
I should have mentioned this site is still on 1.2.6, so I can't use
closest.
However, replacing closest w/ parents does work for me.
Thanks!
On Jul 13, 1:54 pm, James wrote:
> Try closest():http://docs.jquery.com/Traversing/closest
>
>
> text 1
> text 2
> text 3
>
>
> $("td.so
Try closest():
http://docs.jquery.com/Traversing/closest
text 1
text 2
text 3
$("td.someclass").click(function() {
var parentTable = $(this).closest("table");
// and you can get the cells in several ways, here's one
var cells = parentTable.find("td.someclass");
});
3 matches
Mail list logo