我正在处理带有可点击行的javascript数据表.每一行都有onclick函数,但是在我的一列中我有不同的链接打开jquery对话框,在这列上我要禁用行点击方法,怎么做?这是我实现行点击的功能
$(rec' tbody').on( 'click', 'tr', function () {
});
Run Code Online (Sandbox Code Playgroud)
您必须禁用该特定列的行单击
$('rec' tbody'').on('click', 'td', function () {
if ($(this).index() == 4 ) { // provide index of your column in which you prevent row click here is column of 4 index
return;
}
// you can do additional functionality by clicking on this column here
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9058 次 |
| 最近记录: |