Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
Cannot drag element using JQuery draggable (plus JQuery Collision library)

I am trying to make a drag-and-drop software using jQuery draggable and jQuery collision extension.

I have two obstacles [in Red] where I can not drag any element. The problem is I can not drag any element even when there are no obstacles.

Here is my problem https://jsfiddle.net/ayank007/gqd3z0cp/28/ In this example, I am assuming 1 foot = 13.75px, which is also the grid size.

$(".obj3").draggable({
  grid: [13.75,13.75],
  snap: true,
  snapTolerance: 0,
  obstacle: ".butNotHere",
  preventCollision: true,
  containment: "parent"
})

Even without the Grid and Snapping, it's not possible to drag the element.

I want to drag the green div in between the obstacles (red). And even though there is space to drag, I can not drag the green div in between the red ones.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!