Created
September 8, 2008 15:20
-
-
Save rsl/9458 to your computer and use it in GitHub Desktop.
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
$("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