Is there a way to retrieve both the dragged and replaced elements in Sortable JS?
The JavaScript code:
var originalList;
var sortable = Sortable.create(selection, {
handle: '.bars-move',
animation: 150,
/// I am unsure of what needs to be included here
});
Here is the table setup:
<table>
<tbody id="selection">
{{ formset.management_form }}
{% for form in formset %}
{{form.id}}
<tr id="{{form.instance.id}}">
<td>
<img src="{% static 'img/bars_icon.svg' %}" class="bars-move">
</td>
<td>{{form.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
Appreciate the help!