JSFiddle - React, Tailwind, and code Playground

by TJ VanToll

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<ul id="sortable">
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
</ul>

CSS

#sortable { list-style: none; padding: 0; }
#sortable li { border: 1px solid black; }

.original { background: blue; color: white; }

JavaScript

$( "#sortable" ).sortable({
    helper: "clone",
    start: function(event, ui) {
        $( "#sortable li" )
            .filter( ":not(:visible)" )
            .addClass( "original" )
            .show();
    },
    stop: function(event, ui) {
        $( "#sortable .original" )
            .removeClass( "original" );
    }
});