如何防止数据表中特定列的行单击功能?

6 javascript datatable jquery

我正在处理带有可点击行的javascript数据表.每一行都有onclick函数,但是在我的一列中我有不同的链接打开jquery对话框,在这列上我要禁用行点击方法,怎么做?这是我实现行点击的功能

$(rec' tbody').on( 'click', 'tr', function () {

});
Run Code Online (Sandbox Code Playgroud)

Ahm*_*mad 5

您必须禁用该特定列的行单击

$('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)