JSFiddle - React, Tailwind, and code Playground

by narensrinivasans

HTML

<div>
    <p id="test">text</p>
</div>

CSS

div {
    width: 100%;
    background: #000;
}
p {
    background: #ccc;
    cursor: pointer;
    display: inline-block;
    padding: 5px;
}

JavaScript

$("#test").draggable({ axis: "x", revert: true });