JSFiddle - React, Tailwind, and code Playground

by flackend

HTML

<link rel="stylesheet" href="https://raw.github.com/gist/3087536/5627c3e17bd7d85437152c55b1f36d9a9922bbe0/bootstrap.css">
<div class="container"><h1>Sortable 1</h1>
<ul id="sortable1">
    <li>Item 3</li>
    <li>Item 4</li>
    <li>Item 5</li>
</ul>

<p>Sortable 2</p>
<ul id="sortable2">
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 6</li>
</ul>

CSS

body {
    padding: 10px;
}

ul {
    border: 1px solid black;
    margin-bottom: 10px;

}

li {
    border: 1px dotted black;
    margin: 2px;
    padding: 2px;
}

JavaScript

$('#sortable1').sortable({
    connectWith: '#sortable2',
    remove: function(event, ui) {
        $(this).append($(ui.item[0]).clone());
    },
    receive: function(event, ui) {
        $(this).children().each(function() {
            if($(this).text() == $(ui.item[0]).text())
                $(this).remove();
        });
    }
});

$('#sortable2').sortable({
    connectWith: '#sortable1'
});