I found a very good example which demonstrate how to sort elements in HTML using jQuery. It is too perfect to make any changes of it. Try it by yourself. But please note that the sort() function only works in jQuery 1.3.2 or above. Continue reading jQuery – Sort Element