jquery - How to DIsable and Enable colReorder in DataTables -
i can disable , enable button colreorder in datatables jquery
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
Post a Comment