Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dragging HTML cells over the table using Javascript

Folks,

I need a solution that allows drag-and-drop cell over the table.

The cells can be of different colspans, so when the cell is dropped into the middle of another cell, which is bigger, the following steps should be performed:

  1. Another td element is created, which is equal in width to the draggable element.
  2. Cells on left and right of new td element automatically adjust their width.

Now I use JQuery drag-and-drop plug-in. It allows to drag elements, but becomes a bit awkward when it comes to manipulating DOM elements on the part of droppable element.

Could anybody propose some library where this kind of behaviour is implemented?


2 Answers

DragTable might be a good starting point.

like image 125
Alex M Avatar answered Feb 26 '26 05:02

Alex M


Not sure if it supports tables, but I have used link text before and it worked fairly well for me

like image 32
BrilliantWinter Avatar answered Feb 26 '26 05:02

BrilliantWinter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!