I am using Bootstrap-Table in a project and I would like to move rows up or down.
I have these events:
window.actionEvents = { 'click .up': function (e, value, row, index) { var thisrow = $(this).parents("tr:first"), thisrow.prev().data('index', rowindex); }, 'click .down': function (e, value, row, index) { var thisrow = $(this).parents("tr:first"); thisrow.insertAfter(thisrow.next()); }, }
It moves the lines on the screen, but this does not work as well as the row index has not changed ...
So, I tried changing the line .data('index') , but it does not work ...
Has anyone succeeded in moving the line?
javascript jquery twitter-bootstrap bootstrap-table
Amandine
source share