【发布时间】:2015-12-22 16:37:41
【问题描述】:
当我们点击一行时,我使用以下 jQuery 在第一列中选择一个复选框,除非我们点击一行中的最后一个单元格。
tableid.on('click', 'tbody td:not(td:last-child)', function (e) {
$(this).parent().find('input[type="checkbox"]').trigger('click');
});
我将noselecting 类添加到thead>th。现在,就像我使用 :not(td:last-child') 跳过最后一个单元格一样,我如何才能从点击列上的第 td>th 类 noselecting 中跳过 td?
【问题讨论】:
-
我认为你正在尝试做this?
-
我正在尝试选择一个 tbody>td 如果存在 thead>th.noselecting。
标签: jquery