Dragula: Getting information from dragged item in

294 views Asked by At

I am still learning JS and got into Dragula

Is there an easy way to send a console.log of the dragged item and the destination in vanilla JS? (I am not using React or Angular).

I figured I can do this like this:

<script>
dragula([
document.getElementById("to-do"),
document.getElementById("inprogress"),
document.getElementById("done")
]);
    
on("drop", function (el) {
   console.log("el");
}).
</script>

But clearly that doesn't work;

Any suggestions very welcome!

0

There are 0 answers