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

210
Visualizações
Gridstack How to lock the position of the div in current position on click of button?

I want to lock the current div when I click on pin button in it. So even if user try to drag and drop any other div element into the current locked div it should not allow it. I am using Grid stack for dashboard. I have used .movable function mentioned on the document and also tried adding attribute (data-gs-no-move="true" and data-gs-locked='true') to the html element dynamically when I click on the pin button.

It doesn't work. Every time I drag any other div on top of pinned div current pinned div is moving away from the pinned position. Anyone please help.

<div class="grid-stack-item ui-draggable ui-resizable ui-resizable-autohide ui-resizable-disabled ui-draggable-disabled card-lock" data-width="4" data-height="4" data-gs-width="4" data-gs-height="4" data-time="1654604606671" data-gs-x="0" data-gs-y="1"  data-category="energy" data-view-type="bar" data-multiple="true"  data-pinned="false" data-role="card">
        <div class="card-inner grid-stack-item-content ">
            <div class="card-header  ui-draggable-handle">
                <div class="title" >card title</div>
                <button class="pin-card">pin me </button>
            </div>
        </div>
</div>
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