私は次のhtmlを持っています:
<table class="userenrolment ajaxactive">
<tbody>
<tr class="userinforow r0" id="user_9">
<td class="field col_userdetails cell c0" style="">
</td>
<td class="field col_enrol cell c4 lastcol" style="">
<div class="enrolment"><span>Team 1</span>
</div>
</td>
</tr>
<tr class="userinforow r1" id="user_4">
<td class="field col_userdetails cell c0" style="">
</td>
<td class="field col_enrol cell c4 lastcol" style="">
<div class="enrolment"><span>Team 2</span>
</div>
</td>
</tr>
</tbody>
</table>
jQuery を使用して、各 tr からIDを取得し、同じ行に追加したいと考えています。
私の関数は次のようになりますが、まったく機能しません。
function show_groups(){
table.find('.userinforow).each(function(){
var text = $(this).find('#id').val();
$('.enrolment').append('text:' + text + ' <br>');
}