Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

250
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda