Skip to content

Instantly share code, notes, and snippets.

@MrChrisRodriguez
Created October 11, 2013 01:13
Show Gist options
  • Save MrChrisRodriguez/6928157 to your computer and use it in GitHub Desktop.
Save MrChrisRodriguez/6928157 to your computer and use it in GitHub Desktop.
Asana: Order tags alphabetically. Requires jQuery
tags_and_elements = {}
tags_browser = jQuery("#tags_browser [drag_drop_id]")
tags_browser.children().each(
function(i,e){
e = jQuery(e);
tags_and_elements[e.text()] = e;
})
reversed_tags = Object.keys(tags_and_elements).sort().reverse()
jQuery(reversed_tags).each(function(i,tag){
tags_browser.prepend(tags_and_elements[tag])
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment