Sorting DIV's using jQuery

Sort DIVs alphabetically without destroying and recreating the content.

Sort a bunch of div elements on my page with the click of a button.

1. Sort the element array with sort()[1] 
2. Reattach (in their sorted state) with appendTo()[2]


html:
 



script:



Click here to download working sample

Reference:

[1]. sort()

Comments

Popular posts from this blog

Typeahead using Angular JS and Bootstrap

AngularJS Checkbox Select