【发布时间】:2016-07-29 20:08:30
【问题描述】:
我正在尝试从另一个表中映射一行的表数据,但我不确定如何到达那里。
我尝试过这样的事情:
$('.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:不,不会。
-
$(this).closest(".order_info").prev()