I am using tag-it jquery plugin for my work. I want to get tags which i was entered in the text area but i got empty string. here is my code
<?
$simple_tags = array('c++', 'java', 'php', 'coldfusion', 'javascript', 'asp', 'ruby', 'python', 'c', 'scala', 'groovy', 'haskell', 'perl', 'erlang', 'apl', 'cobol', 'go', 'lua');
?>
<script>
$(function(){
var sampleTags = <?php echo json_encode($simple_tags); ?>;
$('#singleFieldTags').tagit({
availableTags: sampleTags,
// This will make Tag-it submit a single form value, as a comma-delimited field.
singleField: true
});
});
function show()
{
console.log($('#singleFieldTags').val());
}
</script>
<div id="wrapper">
<div id="content">
<form>
<ul id="singleFieldTags"></ul>
<input type="submit" value="Submit" onclick="show()">
</form>
</div>
</div>