Last active
February 4, 2019 23:59
-
-
Save shai126/0824ff7c595c679d28bed5343b4b395e to your computer and use it in GitHub Desktop.
Sort the Drip account picker dropdown alphabetically
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
jQuery(function() { | |
var $list = jQuery(".main-nav__accounts ul"); | |
$list.children("li") | |
.sort(function(a, b) { | |
return jQuery(a).text().trim().localeCompare(jQuery(b).text().trim()); | |
}) | |
.appendTo($list); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment