Sort a jQuery selection
July 29, 2014 10:09:55 Last update: July 29, 2014 10:09:55
To sort a selected list of divs by vertical position:
$('div.container').sort(function(a, b) { return $(a).position().top - $(b).position().top })