Created
April 16, 2019 16:00
-
-
Save rscardinho/ea15aff1fdb44f13d753f05961cdbd99 to your computer and use it in GitHub Desktop.
alphabetical-sort-reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sort() { | |
var sortableList = $('.sortable-category'); | |
var listitems = $('.draggable-category', sortableList); | |
listitems.sort(function (a, b) { | |
return ($(a).text().toUpperCase() > $(b).text().toUpperCase()) ? 1 : -1; | |
}); | |
sortableList.append(listitems); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Standing together as a unit, there is greater strength and efficiency to achieve common goals than if it were worked for individually. This is one of the greatest advantages of joining the HSU. BlueChew