I am using Bootstrap Tags Input
I am trying to add tags dynamically.
$(\'.div-tag\').tagsinput(\'add\', \'vino\');
The above code
There is nothing wrong with the library, but when you get this error it means there is a problem with the method initilization.
Try to do it when the page is ready like so:
$(document).ready(function(){
$('#myInput').tagsinput({
allowDuplicates: false,
itemValue: 'id',
itemText: 'label'
});
});
$(".someButton").click(function(){
$('#myInput').tagsinput('add', {id:1, label:"blah blah"});
}