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

108
Visualizações
jquery draggable: draggable stays stationary on page scroll

I'm sure it's something simple I'm missing, but I can't find a google or SO search that returns relevant results because of keyword overlap.

I've got the image of a form with lots of lines that I drag fields onto using cropper. It's complex and I lose track of where I am on the page, so I'd like to "put a pin in it", that is to say: drag a pin off the toolbar and drop it where I'm working.

That's easy: span with a fontawesome pin icon, draggable(), done.

$("#spanPin").draggable({containment: ".imgCrop_dragArea"});

Except that when I scroll, the pin is fixed to the viewport, not the element underneath: the form scrolls out from under the pin and I lose my place.

How can I fix the pin to the element, not the viewport?

(I tried pin.js, but that created more errors than it solved.)

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