Search code examples
javascriptjquerydatatableshighlight

How to disable datatable selection


  1. Looking to disable this select functionality within datatables only.
  2. Can do the ctrl+a as an example is already provided here

enter image description here


Solution

  • use user-select for the td and th tags

     td, th {
       user-select: none;
      -webkit-user-select: none;
      -moz-user-select: -moz-none;
      -ms-user-select: none; 
    }