我目前正在try 查找某个元素的父元素的父元素.我有一个链接被点击,是在<td>
,我想得到<tr>
对象.
为什么"$(This).parent().parent()"不起作用?什么会呢?
谢谢,
Edit: It appears an error in my syntax was throwing the whole thing off. "$(this).parent().parent()" does in fact work, but I wound up going with $(this).closest('tr')" because it seems like the most efficient solution.