Skip to content
Advertisement

Drag and Drop and Sort DIVs in jquery

I’ve encountered a problem in my jquery code.

I need to have 2 divs at the sides of the page which contains some cards. I should be able to drag and drop from the one on the left to the one on the right. the cards must be clone so the original card stays in place.

Also the cards should be sortable within the droppable div and in the end i need to have a list stating the order of the items in the left div.

But here is my problem: the drag and drop works but i cant have 2 of the same item and my sorting doesn’t work.

Here is my code:

JavaScript
JavaScript
JavaScript

Advertisement

Answer

This will help you..

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement