JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<div class='sortable'>
<div class='entry'>Class Entry 1</div>
<div class='entry'>Class Entry 2</div>
<div class='entry'>Class Entry 3</div>
<div id="otherDiv">Other Div 4</div>
<span id="span">Span 5</span>
</div>
CSS
.entry {
border: 1px solid black;
}
#otherDiv, #span {
width: 100px;
height: 20px;
background: red;
color: white;
}
#span {
display: block;
background: blue;
}
JavaScript
// -- stuff re-ordering --
$(".sortable").sortable({
distance: 5,
// items: '.entry', // this will work
tolerance: 'pointer'
});
$('.sortable').sortable('option', 'items', '.entry'); // no effect
$('.sortable').sortable('option', 'containment', 'parent'); // works