With the markup example in the OP, use this: var dp = $('#deal-post tbody tr'); dp.find('input[name^=dealAmount]').keyup(function(){ var amount = $(this); $('#deal-summary tbody tr:eq('+dp.index(amount.closest('tr')) +')').find('td.inc-current').text(amount.val()); });
On Mar 7, 4:10 pm, brian <bally.z...@gmail.com> wrote: > On Sat, Mar 7, 2009 at 6:21 PM, Josh Powell <seas...@gmail.com> wrote: > > > 6 of one... half dozen of another... > > I don't buy that. I've suggested using an attribute whose purpose is > well defined. Making up attributes that aren't represented by the > DOCTYPE is a bad idea. Don't get me wrong--I've done it before. Though > always to store temporary info. Happily, we have data for that, now. > The OP's needs, though, are to identify table cells as being connected > to specific text inputs. That's what ID is for.