我在页面上给定<tr>
的each()循环中。如何遍历<th>
中的所有$(this)
,即当前的<tr>
中的所有:
$('#my_table > tbody > tr').each(function() {
// how to loop through all the <th>'s inside the current tr?
});
最佳答案
$('#my_table > tbody > tr').each(function() {
$('th', this).each( ... );
});