[jQuery] Selecting parent id

2009-01-31 Thread Chrille
Hi everyone, I have a lot of tables, like this: loremipsum lorem2ipsum2 I want to loop through all td:s and select the id of the parent table. What is the best solution for that? $('table td').each(function(){ // select the parent table id here $('parenttable').attr("id"); }); Best rega

[jQuery] Selecting parent ID

2009-01-31 Thread Christoffer
Hi everyone, I have a lot of tables, like this: loremipsum lorem2ipsum2 I want to loop through all td:s and select the id of the parent table. What is the best solution for that? $('table td').each(function(){ // select the parent table id here $('parenttable').attr("id"); }); Best r

[jQuery] Selecting Parent

2008-02-15 Thread Steve Davis
i have a table of linkedthumbnailed images like this... i want to dynamically add a text description below each image using the "title" attribute from the image's parent link, so it looks like this... here's my code... $("a.cluetip img").each(function(i) { $(this).after(this.parents("a