Code as reference:
http://jsbin.com/aboca3/2/edit
In this example above (thank you SLaks) I am truncating long unordered lists and providing a toggle link to view the entire thing.
The issue, from a usability standpoint, is that as a full list, it is best sorted alphabetically, which will be the default sort order (the source order). As a short/truncated list, they are most usefully ordered by the magnitude these options will effect the results, in this case the number in the <em>
element.
So working with the code I already have, I would like to re-order the list numerically by <em>
element (highest to lowest), and then when the list is toggled, re-order it alphabetically/numerically based on toggle state.
I'm having a hell of a time trying to wrap this in to an associative array so I'd love a fresh perspective on how to handle this.
Thank you!