I am using the code from this question sort div elements in a variable. It works perfectly, but rather than storing the div elements in a variable I need to sort them on page.
The div elements will hold a long menu hence wanting to sort divs on page rather than in a variable.