javascript – How to use Dragula.js with dynamic items?


I'm using Dragula.js to move the elements that say class, everything works fine in the first section, but already in the second it does not work. I am also interested in knowing how I can save the position to which the item moved, I hope you can help me with my problems :), thanks in advance.

enter the description of the image here

And my HTML code (The other container of the section contains the same code):


And JS's:

dragula ([document.getElementById("contenedor-clases")], {
    moves: function (the, container, handle) {
        return handle.classList.contains ('move-class') || handle.classList.contains ('icon-move-class');
    }
});