bootstrap-tags-input

Twitter Bootstrap 3 Typeahead / Tagsinput Completing Twice

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 16:31:22
Edit: Added working JSFiddle I'm using Twitter Bootstrap TagsInput with Bootstrap Typeahead. My source is a json file, but that is irrelevant, and I've checked with a static source. The typeahead and tagsinput are working, however when I press enter, tab, or click on a tag, it creates a duplicate complete. That extre 'default' happens whenever I press enter, or complete the typeahead. If I break the typeahead by separating with comma, or taking focus away from the window, it does not occur. Here is the input: <input id="itemCategory" type="text" autocomplete="off" class="tagsInput form-control

tagsinput & typeahead: Cannot read property 'apply' of undefined

时光怂恿深爱的人放手 提交于 2019-12-01 09:25:52
问题 I keep getting this error when trying to use tagsinput & typeahead. html: <section id="examples"> <div class="example example_typeahead"> <h3>Typeahead</h3> <div class="bs-example"> <input class="testing" type="text" value="nope" /> </div> </div> </section> javascript: var data = ['yes', 'yesyes', 'no', 'nope', 'yes again'], elt = $('.testing'); elt.tagsinput({ typeahead: { source: data }, }); I get the apply error after clicking on an item in the list. I also notice that the text I typed isn

How to use Bootstrap Tags Input plugin

99封情书 提交于 2019-11-30 13:49:36
I am trying to use Bootstrap Tags Input plugin without Typeahead. I have included following files: <link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="../../tagsinput/css/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"> <script src="../../tagsinput/js/bootstrap-tagsinput.min.js"></script> The script is as below: <script> $('#tagPlaces').tagsinput({ allowDuplicates: true }); </script> Part of JSP form where using the plugin: <div class="form-group"> <label for="tagPlaces" class="col-sm-2 control-label">Tag Places</label> <div class="col-sm

Bootstrap tagsinput add tag with id and value

流过昼夜 提交于 2019-11-30 11:44:25
I am using Bootstrap Tags Input I am trying to add tags dynamically. $('.div-tag').tagsinput('add', 'vino'); The above code works fine, but when I try the following code: $('.div-tag').tagsinput('add', { id: 1, text: 'some tag' }); I get the error: Uncaught Can't add objects when itemValue option is not set Please help me to add tag with id and value. initialize tags input like $('.div-tag').tagsinput({ allowDuplicates: false, itemValue: 'id', // this will be used to set id of tag itemText: 'label' // this will be used to set text of tag }); To add dynamic tag $('.div-tag').tagsinput('add', {