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>
Atualizando o Passado: Linux no Lenovo G460 em 2025
aaPanel - Um Painel de Hospedagem Gratuito e Poderoso
O macete do Warsaw no Linux Mint e cia
O que você quer para sua vida ao usar o Linux?
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Mikrotik não abre o webmail-segur... da Locaweb (11)
Olha que maravilha, Arch no C2D 7400, 2GB de RAM, vídeo onboard e no G... (3)
Instalação de Ubuntu em SSD (interno) como se fosse um dispositivo ext... (1)