I am trying to implement a drag & drop swap places functionality, but got stuck at the point where once dragged and dropped items need to be swapped again.
The idea is simple: i have 9 squares on a grid and every square should be swappable with any other square so that for example
123<br>
456<br>
789
after 1 and 5 swap would become
523<br>
416<br>
789
And after this all squares would be swapable again.
I would really apreciate your help as i am very new to programming and it is still very hard to find the right answers in other code which have a lot of additional functionality... Thank you very much!