JSFiddle - React, Tailwind, and code Playground

by lucasprus

HTML

<div class="demo">

<div id="draggable" class="ui-widget-content">
    <p>Drag me around</p>
</div>

</div><!-- End demo -->



<div class="demo-description" style="display: none; ">
<p>Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.</p>
</div><!-- End demo-description -->

CSS

#draggable
{ 
    width: 150px; 
    height: 150px; 
    padding: 0.5em; 
    border: 1px solid blue;
}

JavaScript

$(function() {
    $("#draggable").draggable();
});