Enviado em 11/02/2023 - 11:42h
Saudações, estou tendo dificuldade em aprender javascript, estou tentando renderizar objetos arrastáveis atrávés do formbuilder porém não funciona como esperado, onde estou errando?<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<style>
#dragObject { width: 50px; height: 50px; padding: 0.5em; }
</style>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script src="https://formbuilder.online/assets/js/form-render.min.js"></script>
</head>
<body>
<div id="dragObject" class="ui-widget-content draggable">
<p>Drag me around</p>
</div>
<div id="form-render"></div>
<script>
var formData = [
{
"type": "button",
"label": "Button",
"className": "btn-default btn draggable",
"name": "button-1",
}
];
$("#form-render").formRender({
formData: formData
});
$( function() {
$( ".draggable" ).draggable();
} );
$("#form-render").formRender({
formData: formData
});
$( function() {
$( ".draggable" ).draggable();
} );
</script>
</body>
</html>
Aprenda a Gerenciar Permissões de Arquivos no Linux
Como transformar um áudio em vídeo com efeito de forma de onda (wave form)
Como aprovar Pull Requests em seu repositório Github via linha de comando
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Alguém que utilize o Warsaw do BB no Ubuntu 24.04 (4)
estou com problemas aqui no manjaro. (3)
warsaw parou de funcionar após atualização do sistema (solução) (7)