如何检查元素是否是最后一个兄弟?
对于连续的最后一个单元格,我想执行不同的操作.
这不起作用:
$('td').each(function(){
var $this = $(this);
if ( $this === $this.parent().last('td') )
{
alert('123');
}
})
Run Code Online (Sandbox Code Playgroud)
如果我删除它也不会.parent().
jquery ×1