Skip to content

Instantly share code, notes, and snippets.

@dnoseda
Created March 30, 2012 15:16
Show Gist options
  • Save dnoseda/2252219 to your computer and use it in GitHub Desktop.
Save dnoseda/2252219 to your computer and use it in GitHub Desktop.
sort-appa
javascript:(function(){var%20s=document.createElement("script");s.src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js";s.onload=function(){var%20my_options=$("#roles%20option");my_options.sort(function(a,b){if(a.text>b.text){return%201;}else{return%20-1;}});$("#roles").empty().append(my_options);};document.body.appendChild(s);})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment