0
I am doubtful... I would like to integrate the jquery-ui with React... I am creating a calculator and do not know how to make it move on the screen.
I’m trying to collaborate with free software and I don’t know much...
I took this official code from the documentation
<!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.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
#draggable { width: 150px; height: 150px; padding: 0.5em; }
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#draggable").draggable();
});
</script>
</head>
<body>
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</body>
</html>
<script>
$(function() {
$("#draggable").draggable();
});
</script>
The calculator is
https://codepen.io/fabiozinid/pen/BoOGPN
Links
The right question is why integrate jQuery with React? Especially if it’s only because of 1 animation
– Costamilam
As @Costamilam commented, you should think about using both, you know exactly what they both do? so is just "sewing" your code, joining parts, it would be simpler to search for a plugin that makes the drag and drop for React without jquery
– Ricardo Pontual