SortableJS SIMPLE Sortable List example
by greatCar
HTML
<!doctype html>
<link rel="stylesheet" href="style.css">
<!-- SortableJS CDN
https://github.com/solodev/sortable-lists-with-sortablejs
-->
<script src="https://raw.githack.com/SortableJS/Sortable/master/Sortable.js"></script>
<div class="container">
<div class="row">
<div >
<h2 class="h6"><strong>Sortable List</strong></h2>
<div id="sortablelist">
<p id="li1">
List Item 1</p>
<div >
<div>
<p >
List Item 2</p>
</div>
</div>
<div >
<div>
<p >
List Item 3</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
</script>
JavaScript
//https://github.com/solodev/sortable-lists-with-sortablejs
new Sortable(sortablelist, {
animation: 150,
ghostClass: 'blue-background-class'
});
let elem = document.getElementById("li1");
elem.addEventListener('onChoose', function (e) {alert("ee")}, false);