I have this unordered list which can be arranged by the user:
<ul id="sortable1" class="connectedSortable">
<li id="1" class="ui-state-default">A</li>
<li id="2" class="ui-state-default">B</li>
<li id="3" class="ui-state-default">C</li>
<li id="4" class="ui-state-default">D</li>
<li id="5" class="ui-state-default">E</li>
</ul>
I wanted to make a Javascript array based on the arrangement for example if the order is ADBEC then the array should be [1, 4, 2, 5, 3]
An ID has been set for each <li> as an individual identifier.
Please note this refers to the orders of list items not the contents. All help appreciated thanks!