jquery - How to DIsable and Enable colReorder in DataTables -


i can disable , enable button colreorder in datatables jquery

datatable

example code : jsfiddle

function resetcolreordermd() {   $('.datatable thead th').each(function() {     var md = $._data($(this)[0]).events.mousedown;     (var i=0, l=md.length; i<l; i++) {       if (md[i].namespace == 'colreorder') {         md[i].handler = null       }     }     }) } 

but after disabled cann`t enable

self write :

$('.datatable thead th').each(function() {  $(this).removeattr('data-column-index'); }); 

and enable :

$('.datatable thead th').each(function(i) {   $(this).attr('data-column-index', i); }); 

but has bug yet


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -