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

126
Visualizações
Primera vez que intento crear un div arrastrable en jQuery pero no funciona

El código en mis ojos no tiene nada de malo, debería haber funcionado pero no lo hizo. ¿Por qué el div que creé no se puede arrastrar?

 </html> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <div id="drag"> <p>content</p> </div> <style> #drag { background-color: rgb(89, 0, 255); height: 60px; width: 150px; } </style> <script> $(document).ready(()=>{ $(function () { $("#drag").draggable(); }); }) </script> </body> </html>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Debe incluir las siguientes referencias en el proyecto:

  • jquery-ui.css
  • jquery-.js
  • jquery-ui.js

Además, debe definir el elemento <style> dentro del bloque <head></head> .

 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <!-- The following references have been added to the project. --> <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script> <!-- The <style> element has been moved inside the <head> block. --> <style> #drag { background-color: rgb(89, 0, 255); height: 60px; width: 150px; } </style> </head> <body> <div id="drag"> <p>content</p> </div> <script> $(document).ready(() => { $(function () { $("#drag").draggable(); }); }) </script> </body> </html>

about 4 years ago · Juan Pablo Isaza Relatório
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