The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

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.

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)

 
Deleted comment
 
Deleted comment
 
Deleted comment

is it possible to see their portfolio on the site?



Sorry for the delay. Great to hear that you figured it out! If you need further assistance, feel free to ask.


Deleted comment

Nevermind, I figured it out!


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.