Skip to content

Instantly share code, notes, and snippets.

@gr2m
Created September 20, 2010 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gr2m/587770 to your computer and use it in GitHub Desktop.
Save gr2m/587770 to your computer and use it in GitHub Desktop.
javascript:void(function(){$("#user_allow_project%20optgroup").each(function(){var%20optgroup=this;$(optgroup).find('option').each(function(){$('form%20ul.remove_children_on_reset').append('<li%20class=""><input%20type="hidden"%20value="'+this.value+'"%20name="user[allowed_projects_ids][]"><strong>'+$(this).text()+'%20('+optgroup.label+')'+'</strong><a%20class="remove_project"%20href="#">x</a></li>')});$(optgroup).remove()})})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment