I have brought datatable's default click event on every first column by disabling responsive display's type //type: 'none',
. Now, for some targeted action, I want to disable those click event from the first columns.
So, I have written this:
$('td:first-child').off('click');
But, click event hasn't been stopped. How to do this? Here is my demo .
This plugin does not seem to attach individual click handlers. Rather there is a global handler on tbody
and all the logic is within. So the whole thing becomes a double-edged sword. You can achieve what you want using this:
$('tbody').off('click.dtr mousedown.dtr mouseup.dtr');
However, you should keep in mind a few things:
_detailsInit()
function and read through it - that should be a good enough start .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.