While working on a feature that allows users to move options from one select element to another I ran into an issue with alphabetic order. Especially when multiple options are being moved at once.
To easily solve this I wrote a re-order function that orders both select elements at once.
The code’s hosted on Github gists, embedded below:
The same code can be used to order any kind of NodeList.
Leave a Reply