Skip to content

Instantly share code, notes, and snippets.

@rsl
Created September 8, 2008 15:20
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 rsl/9458 to your computer and use it in GitHub Desktop.
Save rsl/9458 to your computer and use it in GitHub Desktop.
$("body.entries #all_tags span").click(function() {
var thisTag = $(this).text();
var indexOfThisTag = jQuery.inArray(thisTag, window.currentTags);
if (indexOfThisTag >= 0) {
window.currentTags.splice(indexOfThisTag, 1);
} else {
window.currentTags.push(thisTag);
}
$("#entry_tags_as_string").val(window.currentTags.join(", "));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment