0

How do you set up jsPlumb draggable divs, with a container div?

I have a container positioned relatively, and the divs to be draggable positioned absolutely (this is what the documentation suggestions). The container is 100px from the top of the page. Unless I set margin-top to be -100px for the container, the drag is shifted over by 100px down. How can I fix this?

Cymen
  • 14,079
  • 4
  • 52
  • 72
ajay14
  • 51
  • 3

1 Answers1

1

Fixed it. I had a padding-top on the body element that caused that very weird error. Takeaway:

  • For draggable to work with jsPlumb, the container element's position should be relative, the draggable elements' position absolute, and any parent elements of the container should not have any padding.
ajay14
  • 51
  • 3