Created
June 8, 2012 15:15
-
-
Save d34th4ck3r/2896107 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
<script> | |
$(function() { | |
var availableTags = [ | |
"Fruits", | |
"Vegetables", | |
"CSS","Python","C","Go Go Go!","Comic" | |
]; | |
$('#demo1').tagit(); | |
$('#demo1GetTags').click(function () { | |
showTags($('#demo1').tagit('tags')) | |
}); | |
}); | |
function showTags(tags) { | |
console.log(tags); | |
var string = "Tags (label : value)\r\n"; | |
string += "--------\r\n"; | |
for (var i in tags) | |
string += tags[i].label + " : " + tags[i].value + "\r\n"; | |
alert(string); | |
} | |
</script> | |
<div id="tagging" align="center" padding="100px"> | |
<br /> <br /> <br /> <br /> | |
<ul id="demo1" name="nameOfSelect"></ul> | |
<div class="buttons"> | |
<button id="demo1GetTags" value="Get Tags">Get Tags</button> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment