If I have an unordered list:
<ul>
<li data-sort-name="a">A</li>
<li data-sort-name="d">D</li>
<li data-sort-name="b">B</li>
<li data-sort-name="c">C</li>
</ul>
and an array:
[a,b,c,d]
Is there a way to sort the above list in the same order as the array. (Array isn't always chronological, that's just for explanation purposes).
Thanks.