jQuery toggleClass example
Toggle class name on click in jQuery
by y_nara
HTML
<div id="example1"></div>
<button class="reset">Reset Row Move</button>
CSS
</style>
<script src="https://cdn.jsdelivr.net/npm/handsontable@7.4.2/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@7.4.2/dist/handsontable.full.min.css">
JavaScript
var example = document.getElementById('example1');
var hot = new Handsontable(example, {
data: Handsontable.helper.createSpreadsheetData(10, 3),
rowHeaders: true,
colHeaders: true,
manualRowMove: true
});
document.querySelector('.reset').addEventListener('click', function(){
var hotOptions = {
'manualRowMove': false
};
hot.updateSettings(hotOptions);
var hotOptions = {
'manualRowMove': true
};
hot.updateSettings(hotOptions);
})