Draggable still not working
Hello,
I followed the steps here: https://devs.keenthemes.com/question/draggable-demos-do-not-work
Unfortunately, draggable is still not working for me in my Django app.
This is how im trying to use it in my js:
<pre> var containers = document.querySelectorAll(".min-h-200px.draggable-zone"); if (containers.length === 0) { console.log("No containers found"); return false; } else { console.log("Containers found: ", containers.length); } var swappable = new Draggable.Sortable(containers, { draggable: ".draggable", handle: ".draggable .draggable-handle", mirror: { //appendTo: selector, appendTo: "body", constrainDimensions: true } }); </pre>But in my browser console, I'm getting Uncaught ReferenceError: Draggable is not defined.
Also, when i remove the "Draggable" and just have
<pre> var swappable = new Sortable(containers, { draggable: ".draggable", handle: ".draggable .draggable-handle", mirror: { //appendTo: selector, appendTo: "body", constrainDimensions: true } }); </pre>I get Uncaught ReferenceError: Sortable is not defined.
Replies (3)
Deleted comment
Deleted comment
Deleted comment
Sorry for the delay. Great to hear that you figured it out! If you need further assistance, feel free to ask.