<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="./tagarea.js"></script>
<script type="text/javascript">
$(function(){
$('#country').tagarea({
taglist_url: './country.php'
});
$('#animal').tagarea();
});
</script>
<div id="country" class="tagareabox">
<div class="pre-tag">["United States", "United Kingdom", "Japan"]</div>
</div>
<div id="animal" class="tagareabox">
<div class="pre-tag">["elefant"]</div>
<div class="pre-list">["panda","giraff","elefant", ... ,"zebra"]</div>
</div>
OPTION | DEFAULT | EXAMPLES |
---|---|---|
taglist_url | null |
|
onAddTag | null |
|
onRemoveTag | null |
|
onChangeTag | null |
|
METHOD | EXAMPLES |
---|---|
execute() |
If this 'lion' tag is already selected, then the tag will be removed. If not, added.
|
inTagbox() |
If this 'lion' tag is already selected and in tagbox, return true.
|
inTaglist() |
If this 'lion' tag is in the taglist of candidates, return true.
|