Damn...that's fantastic. We need to have more details on how to do things
like this. The code I might have come up with for that would have been like
5 or 6 lines long at LEAST!
 
  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jake McGraw
Sent: Friday, May 25, 2007 4:03 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Getting column value for a selected table row?


Maybe, within click or change:

$("[EMAIL PROTECTED]").change(function(){
  $(this).parent().siblings("td:eq(3)"). /* do something */;
});

So you document should look like:

<tr> 
  <td><input type="radio" name="mybutton"/></td>
  <td></td>
  <td></td>
  <td><!-- This is your target --></td>
  <td></td> 
  ...
</tr>

The chain order:

$(this)  --> the radio button
.parent() --> The td element wrapped around radio button
.siblings("td:eq(3)") --> All td element siblings, get the fourth 

Haven't tested, hope it works for you.

- jake


On 5/25/07, Brad Perkins <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote: 


Given a table where the the first column of each row contains a radio 
button.

Is there some jQuery selector magic that would allow me to get the
value of the cell in the 4th column when the radio button is selected?




Reply via email to