我試圖從另一個表中映射一行的tabledata,但我不知道如何到達那裏。jQuery dom遍歷嵌套表
我試過的東西:
$('.order_info .active').closest('tr').prev('tr').children('td').map(function(){
return $(this).text();
}).get();
$(this).find('.order_info .active').closest('tr').prev('tr').children('td').map(function(){
return $(this).text();
}).get();
,但沒有運氣。
這就是DOM的外觀和從哪裏去我需要去的地方。
您可以添加HTML結構? –
嘗試父母並不是最接近 –
@MikeB:不,它不會。 –