UPDATE
I believe that utilizing Jquery is the most appropriate solution for resolving my issue with the demo. Your assistance in making it work would be greatly appreciated. Thank you.
My goal is to develop a scheduler application.
https://i.sstatic.net/8sdQS.jpg
The essential functionality I require includes the ability to vertically resize colored divs and drag them into any row or cell within the table.
For instance, being able to drag and resize an orange div to a row below it.
https://i.sstatic.net/8dpXe.jpg
Alternatively, when resizing the green div, the yellow div should automatically move to the row beneath it.
https://i.sstatic.net/WhTtQ.jpg
Dragging the divs should be straightforward.
I have a functional sandbox DEMO
I came across a fiddle online that perfectly matches my requirements, but it relies on Jquery which I prefer not to use if possible. FIDDLE OF WHAT I AM LOOKING FOR
document.getElementById('drop').addEventListener("click", () => {
sortItemsByTable();
});
document.getElementById('resize').addEventListener("mouseover", () => {
adjustSizeAndPosition();
});