util.sortElements(elements, comparator)
Change the order of elements
(a collection of HTML elements or a selector or jQuery object) in the DOM
according to the comparator(elementA, elementB)
function. The comparator
function has
the exact same meaning as in Array.prototype.sort(comparator)
.