I'm a complete newby to html, javascript and to d3, so I apologize if my question is completely obvious.
I have a html list
<div id="simpleList" class="list-group">
<div class="list-group-item">item 1</div>
<div class="list-group-item">item 2</div>
<div class="list-group-item">item 3</div>
<div class="list-group-item">item 4</div>
</div>
and what I want is to be able to sort the list (by dragging the items for example) and then print the list current order in an html span field, for example
["item 3","item 4","item 2","item 1"]
This information will drive my datasource sort in a D3 graph after. I know that it should be really simple but ...
What I was trying was to use the js "Sortable" script of rubaxa found here . With this script I was able to drag and "sort" the list, but I just don't know how to retrieve the list order.
Any other suggestion about how to do the drag and sort list and how to retrieve the order are welcome. Please have in mind that I'm a total newby. Thanks